Class FlowLogOptions.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.FlowLogOptions.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<FlowLogOptions>
Enclosing interface:
FlowLogOptions

@Stability(Stable) public static final class FlowLogOptions.Builder extends Object implements software.amazon.jsii.Builder<FlowLogOptions>
A builder for FlowLogOptions
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • destination

      @Stability(Stable) public FlowLogOptions.Builder destination(FlowLogDestination destination)
      Parameters:
      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
      Returns:
      this
    • logFormat

      @Stability(Stable) public FlowLogOptions.Builder logFormat(List<? extends LogFormat> logFormat)
      Parameters:
      logFormat - The fields to include in the flow log record, in the order in which they should appear. If multiple fields are specified, they will be separated by spaces. For full control over the literal log format string, pass a single field constructed with LogFormat.custom().

      See https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records

      Returns:
      this
    • maxAggregationInterval

      @Stability(Stable) public FlowLogOptions.Builder maxAggregationInterval(FlowLogMaxAggregationInterval maxAggregationInterval)
      Parameters:
      maxAggregationInterval - The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. When creating flow logs for a Transit Gateway or Transit Gateway Attachment, this property must be ONE_MINUTES.
      Returns:
      this
    • trafficType

      @Stability(Stable) public FlowLogOptions.Builder trafficType(FlowLogTrafficType trafficType)
      Parameters:
      trafficType - The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. When the target is either TransitGateway or TransitGatewayAttachment, setting the traffic type is not possible.
      Returns:
      this
    • build

      @Stability(Stable) public FlowLogOptions build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<FlowLogOptions>
      Returns:
      a new instance of FlowLogOptions
      Throws:
      NullPointerException - if any required attribute was not provided