FlowLogResourceType Class
The type of resource to create the flow log for.
Example
ts
declare const tgw: ec2.CfnTransitGateway;
new ec2.FlowLog(this, 'TransitGatewayFlowLog', {
resourceType: ec2.FlowLogResourceType.fromTransitGatewayId(tgw.ref)
})
python
# tgw: ec2.CfnTransitGateway
ec2.FlowLog(self, "TransitGatewayFlowLog",
resource_type=ec2.FlowLogResourceType.from_transit_gateway_id(tgw.ref)
)
java
CfnTransitGateway tgw;
FlowLog.Builder.create(this, "TransitGatewayFlowLog")
.resourceType(FlowLogResourceType.fromTransitGatewayId(tgw.getRef()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
CfnTransitGateway tgw;
new FlowLog(this, "TransitGatewayFlowLog", new FlowLogProps {
ResourceType = FlowLogResourceType.FromTransitGatewayId(tgw.Ref)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var tgw CfnTransitGateway
ec2.NewFlowLog(this, jsii.String("TransitGatewayFlowLog"), &FlowLogProps{
ResourceType: ec2.FlowLogResourceType_FromTransitGatewayId(tgw.ref),
})
Initializer
ts
new FlowLogResourceType()
python
FlowLogResourceType()
java
new FlowLogResourceType()
csharp
new FlowLogResourceType()
go
NewFlowLogResourceType()
Properties
Methods
fromNetworkInterfaceId(id: string): FlowLogResourceType // chainable@staticmethod def from_network_interface_id(id: str) -> FlowLogResourceTypepublic static FlowLogResourceType fromNetworkInterfaceId(String id)public static FlowLogResourceType FromNetworkInterfaceId(string id)func FromNetworkInterfaceId(Id *string) FlowLogResourceTypestatic#The Network Interface to attach the Flow Log to.
fromSubnet(subnet: ISubnetRef): FlowLogResourceType // chainable@staticmethod def from_subnet(subnet: ISubnetRef) -> FlowLogResourceTypepublic static FlowLogResourceType fromSubnet(ISubnetRef subnet)public static FlowLogResourceType FromSubnet(ISubnetRef subnet)func FromSubnet(Subnet ISubnetRef) FlowLogResourceTypestatic#The subnet to attach the Flow Log to.
fromTransitGatewayAttachmentId(id: string): FlowLogResourceType // chainable@staticmethod def from_transit_gateway_attachment_id(id: str) -> FlowLogResourceTypepublic static FlowLogResourceType fromTransitGatewayAttachmentId(String id)public static FlowLogResourceType FromTransitGatewayAttachmentId(string id)func FromTransitGatewayAttachmentId(Id *string) FlowLogResourceTypestatic#The Transit Gateway Attachment to attach the Flow Log to.
fromTransitGatewayId(id: string): FlowLogResourceType // chainable@staticmethod def from_transit_gateway_id(id: str) -> FlowLogResourceTypepublic static FlowLogResourceType fromTransitGatewayId(String id)public static FlowLogResourceType FromTransitGatewayId(string id)func FromTransitGatewayId(Id *string) FlowLogResourceTypestatic#The Transit Gateway to attach the Flow Log to.
fromVpc(vpc: IVpc): FlowLogResourceType // chainable@staticmethod def from_vpc(vpc: IVpc) -> FlowLogResourceTypepublic static FlowLogResourceType fromVpc(IVpc vpc)public static FlowLogResourceType FromVpc(IVpc vpc)func FromVpc(Vpc IVpc) FlowLogResourceTypestatic#The VPC to attach the Flow Log to.