Class FlowLog.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.FlowLog.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FlowLog>
- Enclosing class:
FlowLog
@Stability(Stable)
public static final class FlowLog.Builder
extends Object
implements software.amazon.jsii.Builder<FlowLog>
A fluent builder for
FlowLog
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static FlowLog.Builder
destination
(FlowLogDestination destination) Specifies the type of destination to which the flow log data is to be published.flowLogName
(String flowLogName) The name of the FlowLog.resourceType
(FlowLogResourceType resourceType) The type of resource for which to create the flow log.trafficType
(FlowLogTrafficType trafficType) The type of traffic to log.
-
Method Details
-
create
@Stability(Stable) public static FlowLog.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
FlowLog.Builder
.
-
destination
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
Default: FlowLogDestinationType.toCloudWatchLogs()
- Parameters:
destination
- Specifies the type of destination to which the flow log data is to be published. This parameter is required.- Returns:
this
-
trafficType
The type of traffic to log.You can log traffic that the resource accepts or rejects, or all traffic.
Default: ALL
- Parameters:
trafficType
- The type of traffic to log. This parameter is required.- Returns:
this
-
resourceType
The type of resource for which to create the flow log.- Parameters:
resourceType
- The type of resource for which to create the flow log. This parameter is required.- Returns:
this
-
flowLogName
The name of the FlowLog.It is not recommended to use an explicit name.
Default: If you don't specify a flowLogName, AWS CloudFormation generates a unique physical ID and uses that ID for the group name.
- Parameters:
flowLogName
- The name of the FlowLog. This parameter is required.- Returns:
this
-
build
-