interface FlowLogDestinationConfig
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EC2.FlowLogDestinationConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#FlowLogDestinationConfig |
Java | software.amazon.awscdk.services.ec2.FlowLogDestinationConfig |
Python | aws_cdk.aws_ec2.FlowLogDestinationConfig |
TypeScript (source) | aws-cdk-lib » aws_ec2 » FlowLogDestinationConfig |
Obtainable from
Flow.bind()
Flow Log Destination configuration.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
import { aws_kinesisfirehose as interfaces_kinesisfirehose } from 'aws-cdk-lib/interfaces';
import { aws_logs as interfaces_logs } from 'aws-cdk-lib/interfaces';
declare const bucket: s3.Bucket;
declare const deliveryStreamRef: interfaces_kinesisfirehose.IDeliveryStreamRef;
declare const logGroupRef: interfaces_logs.ILogGroupRef;
declare const role: iam.Role;
const flowLogDestinationConfig: ec2.FlowLogDestinationConfig = {
logDestinationType: ec2.FlowLogDestinationType.CLOUD_WATCH_LOGS,
// the properties below are optional
deliveryStream: deliveryStreamRef,
deliveryStreamArn: 'deliveryStreamArn',
destinationOptions: {
fileFormat: ec2.FlowLogFileFormat.PLAIN_TEXT,
hiveCompatiblePartitions: false,
perHourPartition: false,
},
iamRole: role,
keyPrefix: 'keyPrefix',
logGroup: logGroupRef,
s3Bucket: bucket,
};
Properties
| Name | Type | Description |
|---|---|---|
| log | Flow | The type of destination to publish the flow logs to. |
| delivery | IDelivery | The Amazon Data Firehose delivery stream to publish the flow logs to. |
| delivery | string | The ARN of Amazon Data Firehose delivery stream to publish the flow logs to. |
| destination | Destination | Options for writing flow logs to a supported destination. |
| iam | IRole | The IAM role that allows Amazon EC2 to publish flow logs to the log destination. |
| key | string | S3 bucket key prefix to publish the flow logs to. |
| log | ILog | The CloudWatch Logs Log Group to publish the flow logs to. |
| s3 | IBucket | S3 bucket to publish the flow logs to. |
logDestinationType
Type:
Flow
The type of destination to publish the flow logs to.
deliveryStream?
Type:
IDelivery
(optional, default: undefined)
The Amazon Data Firehose delivery stream to publish the flow logs to.
deliveryStreamArn?
⚠️ Deprecated: use deliveryStream
Type:
string
(optional, default: undefined)
The ARN of Amazon Data Firehose delivery stream to publish the flow logs to.
destinationOptions?
Type:
Destination
(optional, default: undefined)
Options for writing flow logs to a supported destination.
iamRole?
Type:
IRole
(optional, default: default IAM role is created for you if the destination type is CloudWatch logs)
The IAM role that allows Amazon EC2 to publish flow logs to the log destination.
Required if the destination type is CloudWatch logs, or if the destination type is Amazon Data Firehose delivery stream and the delivery stream and the VPC are in different accounts.
keyPrefix?
Type:
string
(optional, default: undefined)
S3 bucket key prefix to publish the flow logs to.
logGroup?
Type:
ILog
(optional, default: default log group is created for you)
The CloudWatch Logs Log Group to publish the flow logs to.
s3Bucket?
Type:
IBucket
(optional, default: undefined)
S3 bucket to publish the flow logs to.

.NET
Go
Java
Python
TypeScript (