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 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

      @Stability(Stable) public FlowLog.Builder destination(FlowLogDestination 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

      @Stability(Stable) public FlowLog.Builder trafficType(FlowLogTrafficType 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

      @Stability(Stable) public FlowLog.Builder resourceType(FlowLogResourceType 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

      @Stability(Stable) public FlowLog.Builder flowLogName(String 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

      @Stability(Stable) public FlowLog build()
      Specified by:
      build in interface software.amazon.jsii.Builder<FlowLog>
      Returns:
      a newly built instance of FlowLog.