FlowLogTrafficType

class aws_cdk.aws_ec2.FlowLogTrafficType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The type of VPC traffic to log.

ExampleMetadata:

infused

Example:

vpc = ec2.Vpc(self, "Vpc")

vpc.add_flow_log("FlowLogS3",
    destination=ec2.FlowLogDestination.to_s3()
)

# Only reject traffic and interval every minute.
vpc.add_flow_log("FlowLogCloudWatch",
    traffic_type=ec2.FlowLogTrafficType.REJECT,
    max_aggregation_interval=ec2.FlowLogMaxAggregationInterval.ONE_MINUTE
)

Attributes

ACCEPT

Only log accepts.

ALL

Log all requests.

REJECT

Only log rejects.