aws-cdk-lib.aws_ec2.FlowLogTrafficType

enum FlowLogTrafficType

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

The type of VPC traffic to log.

Example

const vpc = new ec2.Vpc(this, 'Vpc');

vpc.addFlowLog('FlowLogS3', {
  destination: ec2.FlowLogDestination.toS3()
});

// Only reject traffic and interval every minute.
vpc.addFlowLog('FlowLogCloudWatch', {
  trafficType: ec2.FlowLogTrafficType.REJECT,
  maxAggregationInterval: ec2.FlowLogMaxAggregationInterval.ONE_MINUTE,
});

Members

NameDescription
ACCEPTOnly log accepts.
ALLLog all requests.
REJECTOnly log rejects.

ACCEPT

Only log accepts.


ALL

Log all requests.


REJECT

Only log rejects.