@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-02T20:25:30.394Z") public class FlowLog extends Resource implements IFlowLog
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();
Modifier and Type | Class and Description |
---|---|
static class |
FlowLog.Builder
A fluent builder for
FlowLog . |
IFlowLog.Jsii$Default, IFlowLog.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
FlowLog(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
FlowLog(software.amazon.jsii.JsiiObjectRef objRef) |
|
FlowLog(software.constructs.Construct scope,
java.lang.String id,
FlowLogProps props) |
Modifier and Type | Method and Description |
---|---|
static IFlowLog |
fromFlowLogId(software.constructs.Construct scope,
java.lang.String id,
java.lang.String flowLogId)
Import a Flow Log by it's Id.
|
IBucket |
getBucket()
The S3 bucket to publish flow logs to.
|
java.lang.String |
getFlowLogId()
The Id of the VPC Flow Log.
|
IRole |
getIamRole()
The iam role used to publish logs to CloudWatch.
|
java.lang.String |
getKeyPrefix()
S3 bucket key prefix to publish the flow logs under.
|
ILogGroup |
getLogGroup()
The CloudWatch Logs LogGroup to publish flow logs to.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected FlowLog(software.amazon.jsii.JsiiObjectRef objRef)
protected FlowLog(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public FlowLog(software.constructs.Construct scope, java.lang.String id, FlowLogProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IFlowLog fromFlowLogId(software.constructs.Construct scope, java.lang.String id, java.lang.String flowLogId)
scope
- This parameter is required.id
- This parameter is required.flowLogId
- This parameter is required.public java.lang.String getFlowLogId()
getFlowLogId
in interface IFlowLog
public IBucket getBucket()
public IRole getIamRole()
public java.lang.String getKeyPrefix()
public ILogGroup getLogGroup()