Class FlowLog
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.ec2.FlowLog
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IFlowLog
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:39.309Z")
@Stability(Stable)
public class FlowLog
extends Resource
implements IFlowLog
A VPC flow log.
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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IFlowLog
IFlowLog.Jsii$Default, IFlowLog.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FlowLog
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
FlowLog
(software.amazon.jsii.JsiiObjectRef objRef) FlowLog
(software.constructs.Construct scope, String id, FlowLogProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IFlowLog
fromFlowLogId
(software.constructs.Construct scope, String id, String flowLogId) Import a Flow Log by it's Id.The S3 bucket to publish flow logs to.The Id of the VPC Flow Log.The iam role used to publish logs to CloudWatch.S3 bucket key prefix to publish the flow logs under.The CloudWatch Logs LogGroup to publish flow logs to.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FlowLog
protected FlowLog(software.amazon.jsii.JsiiObjectRef objRef) -
FlowLog
protected FlowLog(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
FlowLog
@Stability(Stable) public FlowLog(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FlowLogProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromFlowLogId
@Stability(Stable) @NotNull public static IFlowLog fromFlowLogId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String flowLogId) Import a Flow Log by it's Id.- Parameters:
scope
- This parameter is required.id
- This parameter is required.flowLogId
- This parameter is required.
-
getFlowLogId
The Id of the VPC Flow Log.- Specified by:
getFlowLogId
in interfaceIFlowLog
-
getBucket
The S3 bucket to publish flow logs to. -
getIamRole
The iam role used to publish logs to CloudWatch. -
getKeyPrefix
S3 bucket key prefix to publish the flow logs under. -
getLogGroup
The CloudWatch Logs LogGroup to publish flow logs to.
-