Class FlowLogResourceType
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.FlowLogResourceType
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-10-26T00:56:07.065Z")
@Stability(Stable)
public abstract class FlowLogResourceType
extends software.amazon.jsii.JsiiObject
The type of resource to create the flow log for.
Example:
Vpc vpc;
LogGroup logGroup = new LogGroup(this, "MyCustomLogGroup");
Role role = Role.Builder.create(this, "MyCustomRole")
.assumedBy(new ServicePrincipal("vpc-flow-logs.amazonaws.com"))
.build();
FlowLog.Builder.create(this, "FlowLog")
.resourceType(FlowLogResourceType.fromVpc(vpc))
.destination(FlowLogDestination.toCloudWatchLogs(logGroup, role))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedFlowLogResourceType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedFlowLogResourceType(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic FlowLogResourceTypeThe Network Interface to attach the Flow Log to.static FlowLogResourceTypefromSubnet(ISubnet subnet) The subnet to attach the Flow Log to.static FlowLogResourceTypeThe VPC to attach the Flow Log to.abstract StringThe Id of the resource that the flow log should be attached to.abstract StringThe type of resource to attach a flow log to.abstract voidsetResourceId(String value) The Id of the resource that the flow log should be attached to.abstract voidsetResourceType(String value) The type of resource to attach a flow log to.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FlowLogResourceType
protected FlowLogResourceType(software.amazon.jsii.JsiiObjectRef objRef) -
FlowLogResourceType
protected FlowLogResourceType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
FlowLogResourceType
@Stability(Stable) protected FlowLogResourceType()
-
-
Method Details
-
fromNetworkInterfaceId
@Stability(Stable) @NotNull public static FlowLogResourceType fromNetworkInterfaceId(@NotNull String id) The Network Interface to attach the Flow Log to.- Parameters:
id- This parameter is required.
-
fromSubnet
The subnet to attach the Flow Log to.- Parameters:
subnet- This parameter is required.
-
fromVpc
The VPC to attach the Flow Log to.- Parameters:
vpc- This parameter is required.
-
getResourceId
The Id of the resource that the flow log should be attached to. -
setResourceId
The Id of the resource that the flow log should be attached to. -
getResourceType
The type of resource to attach a flow log to. -
setResourceType
The type of resource to attach a flow log to.
-