aws-cdk-lib.aws_ec2.FlowLogDestinationConfig

interface FlowLogDestinationConfig

LanguageType name
.NETAmazon.CDK.AWS.EC2.FlowLogDestinationConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#FlowLogDestinationConfig
Javasoftware.amazon.awscdk.services.ec2.FlowLogDestinationConfig
Pythonaws_cdk.aws_ec2.FlowLogDestinationConfig
TypeScript (source)aws-cdk-lib » aws_ec2 » FlowLogDestinationConfig

Obtainable from FlowLogDestination.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_logs as logs } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';

declare const bucket: s3.Bucket;
declare const logGroup: logs.LogGroup;
declare const role: iam.Role;
const flowLogDestinationConfig: ec2.FlowLogDestinationConfig = {
  logDestinationType: ec2.FlowLogDestinationType.CLOUD_WATCH_LOGS,

  // the properties below are optional
  destinationOptions: {
    fileFormat: ec2.FlowLogFileFormat.PLAIN_TEXT,
    hiveCompatiblePartitions: false,
    perHourPartition: false,
  },
  iamRole: role,
  keyPrefix: 'keyPrefix',
  logGroup: logGroup,
  s3Bucket: bucket,
};

Properties

NameTypeDescription
logDestinationTypeFlowLogDestinationTypeThe type of destination to publish the flow logs to.
destinationOptions?DestinationOptionsOptions for writing flow logs to a supported destination.
iamRole?IRoleThe IAM Role that has access to publish to CloudWatch logs.
keyPrefix?stringS3 bucket key prefix to publish the flow logs to.
logGroup?ILogGroupThe CloudWatch Logs Log Group to publish the flow logs to.
s3Bucket?IBucketS3 bucket to publish the flow logs to.

logDestinationType

Type: FlowLogDestinationType

The type of destination to publish the flow logs to.


destinationOptions?

Type: DestinationOptions (optional, default: undefined)

Options for writing flow logs to a supported destination.


iamRole?

Type: IRole (optional, default: default IAM role is created for you)

The IAM Role that has access to publish to CloudWatch logs.


keyPrefix?

Type: string (optional, default: undefined)

S3 bucket key prefix to publish the flow logs to.


logGroup?

Type: ILogGroup (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.