FlowLogDestinationConfig Struct
Flow Log Destination configuration.
Example
ts
// 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
deliveryStreamIDeliveryStreamRefdelivery_streamIDeliveryStreamRefdeliveryStreamIDeliveryStreamRefDeliveryStreamIDeliveryStreamRefDeliveryStreamIDeliveryStreamRef= undefined#The Amazon Data Firehose delivery stream to publish the flow logs to.
deliveryStreamArnstringdelivery_stream_arnstrdeliveryStreamArnStringDeliveryStreamArnstringDeliveryStreamArn*string= undefineddeprecated#use deliveryStream
destinationOptionsDestinationOptionsdestination_optionsDestinationOptionsdestinationOptionsDestinationOptionsDestinationOptionsDestinationOptionsDestinationOptionsDestinationOptions= undefined#Options for writing flow logs to a supported destination.
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.
default
Default: default IAM role is created for you if the destination type is CloudWatch logs
S3 bucket key prefix to publish the flow logs to.
logDestinationTypeFlowLogDestinationTypelog_destination_typeFlowLogDestinationTypelogDestinationTypeFlowLogDestinationTypeLogDestinationTypeFlowLogDestinationTypeLogDestinationTypeFlowLogDestinationType= CLOUD_WATCH_LOGSrequired#The type of destination to publish the flow logs to.
logGroupILogGroupReflog_groupILogGroupReflogGroupILogGroupRefLogGroupILogGroupRefLogGroupILogGroupRef= default log group is created for…#The CloudWatch Logs Log Group to publish the flow logs to.
default
Default: default log group is created for you