FlowLogResourceType

class aws_cdk.aws_ec2.FlowLogResourceType

Bases: object

The type of resource to create the flow log for.

ExampleMetadata:

infused

Example:

# tgw: ec2.CfnTransitGateway


ec2.FlowLog(self, "TransitGatewayFlowLog",
    resource_type=ec2.FlowLogResourceType.from_transit_gateway_id(tgw.ref)
)

Attributes

resource_id

The Id of the resource that the flow log should be attached to.

resource_type

The type of resource to attach a flow log to.

Static Methods

classmethod from_network_interface_id(id)

The Network Interface to attach the Flow Log to.

Parameters:

id (str) –

Return type:

FlowLogResourceType

classmethod from_subnet(subnet)

The subnet to attach the Flow Log to.

Parameters:

subnet (ISubnet) –

Return type:

FlowLogResourceType

classmethod from_transit_gateway_attachment_id(id)

The Transit Gateway Attachment to attach the Flow Log to.

Parameters:

id (str) –

Return type:

FlowLogResourceType

classmethod from_transit_gateway_id(id)

The Transit Gateway to attach the Flow Log to.

Parameters:

id (str) –

Return type:

FlowLogResourceType

classmethod from_vpc(vpc)

The VPC to attach the Flow Log to.

Parameters:

vpc (IVpc) –

Return type:

FlowLogResourceType