class FlowLog (construct)
A VPC flow log.
new FlowLog(scope: Construct, id: string, props: FlowLogProps)
|resource||The type of resource for which to create the flow log.|
|destination?||Specifies the type of destination to which the flow log data is to be published.|
|flow||The name of the FlowLog.|
|traffic||The type of traffic to log.|
The type of resource for which to create the flow log.
(optional, default: FlowLogDestinationType.toCloudWatchLogs())
Specifies the type of destination to which the flow log data is to be published.
Flow log data can be published to CloudWatch Logs or Amazon S3
(optional, default: If you don't specify a flowLogName, AWS CloudFormation generates a
unique physical ID and uses that ID for the group name.)
The name of the FlowLog.
It is not recommended to use an explicit name.
(optional, default: ALL)
The type of traffic to log.
You can log traffic that the resource accepts or rejects, or all traffic.
|env||The environment this resource belongs to.|
|flow||The Id of the VPC Flow Log.|
|node||The construct tree node associated with this construct.|
|stack||The stack in which this resource is defined.|
|bucket?||The S3 bucket to publish flow logs to.|
|iam||The iam role used to publish logs to CloudWatch.|
|key||S3 bucket key prefix to publish the flow logs under.|
|log||The CloudWatch Logs LogGroup to publish flow logs to.|
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
The Id of the VPC Flow Log.
The construct tree node associated with this construct.
The stack in which this resource is defined.
The S3 bucket to publish flow logs to.
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.
|to||Returns a string representation of this construct.|
|static from||Import a Flow Log by it's Id.|
public toString(): string
Returns a string representation of this construct.
Flow Log Id(scope, id, flowLogId)
public static fromFlowLogId(scope: Construct, id: string, flowLogId: string): IFlowLog
Import a Flow Log by it's Id.