Interface FlowLogOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
FlowLogProps
- All Known Implementing Classes:
FlowLogOptions.Jsii$Proxy,FlowLogProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-10-26T00:56:07.064Z")
@Stability(Stable)
public interface FlowLogOptions
extends software.amazon.jsii.JsiiSerializable
Options to add a flow log to a VPC.
Example:
Vpc vpc = new Vpc(this, "Vpc");
vpc.addFlowLog("FlowLogS3", FlowLogOptions.builder()
.destination(FlowLogDestination.toS3())
.build());
// Only reject traffic and interval every minute.
vpc.addFlowLog("FlowLogCloudWatch", FlowLogOptions.builder()
.trafficType(FlowLogTrafficType.REJECT)
.maxAggregationInterval(FlowLogMaxAggregationInterval.ONE_MINUTE)
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forFlowLogOptionsstatic final classAn implementation forFlowLogOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic FlowLogOptions.Builderbuilder()default FlowLogDestinationSpecifies the type of destination to which the flow log data is to be published.The fields to include in the flow log record, in the order in which they should appear.default FlowLogMaxAggregationIntervalThe maximum interval of time during which a flow of packets is captured and aggregated into a flow log record.default FlowLogTrafficTypeThe type of traffic to log.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDestination
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()
-
getLogFormat
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
Default: - default log format is used.
-
getMaxAggregationInterval
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record.Default: FlowLogMaxAggregationInterval.TEN_MINUTES
-
getTrafficType
The type of traffic to log.You can log traffic that the resource accepts or rejects, or all traffic.
Default: ALL
-
builder
- Returns:
- a
FlowLogOptions.BuilderofFlowLogOptions
-