Class FlowLogDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.FlowLogDestination
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:24:57.214Z")
@Stability(Stable)
public abstract class FlowLogDestination
extends software.amazon.jsii.JsiiObject
The destination type for the flow log.
Example:
Vpc vpc; LogGroup logGroup = new LogGroup(this, "MyCustomLogGroup"); Role role = Role.Builder.create(this, "MyCustomRole") .assumedBy(new ServicePrincipal("vpc-flow-logs.amazonaws.com")) .build(); FlowLog.Builder.create(this, "FlowLog") .resourceType(FlowLogResourceType.fromVpc(vpc)) .destination(FlowLogDestination.toCloudWatchLogs(logGroup, role)) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
FlowLogDestination
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
FlowLogDestination
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionabstract FlowLogDestinationConfig
Generates a flow log destination configuration.static FlowLogDestination
Use CloudWatch logs as the destination.static FlowLogDestination
toCloudWatchLogs
(ILogGroup logGroup) Use CloudWatch logs as the destination.static FlowLogDestination
toCloudWatchLogs
(ILogGroup logGroup, IRole iamRole) Use CloudWatch logs as the destination.static FlowLogDestination
toKinesisDataFirehoseDestination
(String deliveryStreamArn) Use Kinesis Data Firehose as the destination.static FlowLogDestination
toS3()
Use S3 as the destination.static FlowLogDestination
Use S3 as the destination.static FlowLogDestination
Use S3 as the destination.static FlowLogDestination
toS3
(IBucket bucket, String keyPrefix, S3DestinationOptions options) Use S3 as the destination.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FlowLogDestination
protected FlowLogDestination(software.amazon.jsii.JsiiObjectRef objRef) -
FlowLogDestination
protected FlowLogDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
FlowLogDestination
@Stability(Stable) protected FlowLogDestination()
-
-
Method Details
-
toCloudWatchLogs
@Stability(Stable) @NotNull public static FlowLogDestination toCloudWatchLogs(@Nullable ILogGroup logGroup, @Nullable IRole iamRole) Use CloudWatch logs as the destination.- Parameters:
logGroup
-iamRole
-
-
toCloudWatchLogs
@Stability(Stable) @NotNull public static FlowLogDestination toCloudWatchLogs(@Nullable ILogGroup logGroup) Use CloudWatch logs as the destination.- Parameters:
logGroup
-
-
toCloudWatchLogs
Use CloudWatch logs as the destination. -
toKinesisDataFirehoseDestination
@Stability(Stable) @NotNull public static FlowLogDestination toKinesisDataFirehoseDestination(@NotNull String deliveryStreamArn) Use Kinesis Data Firehose as the destination.- Parameters:
deliveryStreamArn
- the ARN of Kinesis Data Firehose delivery stream to publish logs to. This parameter is required.
-
toS3
@Stability(Stable) @NotNull public static FlowLogDestination toS3(@Nullable IBucket bucket, @Nullable String keyPrefix, @Nullable S3DestinationOptions options) Use S3 as the destination.- Parameters:
bucket
- optional s3 bucket to publish logs to.keyPrefix
- optional prefix within the bucket to write logs to.options
- additional s3 destination options.
-
toS3
@Stability(Stable) @NotNull public static FlowLogDestination toS3(@Nullable IBucket bucket, @Nullable String keyPrefix) Use S3 as the destination.- Parameters:
bucket
- optional s3 bucket to publish logs to.keyPrefix
- optional prefix within the bucket to write logs to.
-
toS3
Use S3 as the destination.- Parameters:
bucket
- optional s3 bucket to publish logs to.
-
toS3
Use S3 as the destination. -
bind
@Stability(Stable) @NotNull public abstract FlowLogDestinationConfig bind(@NotNull software.constructs.Construct scope, @NotNull FlowLog flowLog) Generates a flow log destination configuration.- Parameters:
scope
- This parameter is required.flowLog
- This parameter is required.
-