Interface DestinationS3BackupProps
- All Superinterfaces:
CommonDestinationS3Props
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DestinationS3BackupProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.946Z")
@Stability(Experimental)
public interface DestinationS3BackupProps
extends software.amazon.jsii.JsiiSerializable, CommonDestinationS3Props
(experimental) Properties for defining an S3 backup destination.
S3 backup is available for all destinations, regardless of whether the final destination is S3 or not.
Example:
import path.*; import software.amazon.awscdk.services.kinesisfirehose.*; import software.amazon.awscdk.services.kms.*; import software.amazon.awscdk.services.lambda.nodejs.*; import software.amazon.awscdk.services.logs.*; import software.amazon.awscdk.services.s3.*; import software.amazon.awscdk.core.*; import software.amazon.awscdk.services.kinesisfirehose.destinations.*; App app = new App(); Stack stack = new Stack(app, "aws-cdk-firehose-delivery-stream-s3-all-properties"); Bucket bucket = Bucket.Builder.create(stack, "Bucket") .removalPolicy(RemovalPolicy.DESTROY) .autoDeleteObjects(true) .build(); Bucket backupBucket = Bucket.Builder.create(stack, "BackupBucket") .removalPolicy(RemovalPolicy.DESTROY) .autoDeleteObjects(true) .build(); LogGroup logGroup = LogGroup.Builder.create(stack, "LogGroup") .removalPolicy(RemovalPolicy.DESTROY) .build(); NodejsFunction dataProcessorFunction = NodejsFunction.Builder.create(stack, "DataProcessorFunction") .entry(join(__dirname, "lambda-data-processor.js")) .timeout(Duration.minutes(1)) .build(); LambdaFunctionProcessor processor = LambdaFunctionProcessor.Builder.create(dataProcessorFunction) .bufferInterval(Duration.seconds(60)) .bufferSize(Size.mebibytes(1)) .retries(1) .build(); Key key = Key.Builder.create(stack, "Key") .removalPolicy(RemovalPolicy.DESTROY) .build(); Key backupKey = Key.Builder.create(stack, "BackupKey") .removalPolicy(RemovalPolicy.DESTROY) .build(); DeliveryStream.Builder.create(stack, "Delivery Stream") .destinations(List.of(S3Bucket.Builder.create(bucket) .logging(true) .logGroup(logGroup) .processor(processor) .compression(Compression.GZIP) .dataOutputPrefix("regularPrefix") .errorOutputPrefix("errorPrefix") .bufferingInterval(Duration.seconds(60)) .bufferingSize(Size.mebibytes(1)) .encryptionKey(key) .s3Backup(DestinationS3BackupProps.builder() .mode(BackupMode.ALL) .bucket(backupBucket) .compression(Compression.ZIP) .dataOutputPrefix("backupPrefix") .errorOutputPrefix("backupErrorPrefix") .bufferingInterval(Duration.seconds(60)) .bufferingSize(Size.mebibytes(1)) .encryptionKey(backupKey) .build()) .build())) .build(); app.synth();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDestinationS3BackupProps
static final class
An implementation forDestinationS3BackupProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default IBucket
(experimental) The S3 bucket that will store data and failed records.default Boolean
(experimental) If true, log errors when data transformation or data delivery fails.default ILogGroup
(experimental) The CloudWatch log group where log streams will be created to hold error logs.default BackupMode
getMode()
(experimental) Indicates the mode by which incoming records should be backed up to S3, if any.Methods inherited from interface software.amazon.awscdk.services.kinesisfirehose.destinations.CommonDestinationS3Props
getBufferingInterval, getBufferingSize, getCompression, getDataOutputPrefix, getEncryptionKey, getErrorOutputPrefix
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBucket
(experimental) The S3 bucket that will store data and failed records.Default: - If `mode` is set to `BackupMode.ALL` or `BackupMode.FAILED`, a bucket will be created for you.
-
getLogging
(experimental) If true, log errors when data transformation or data delivery fails.If
logGroup
is provided, this will be implicitly set totrue
.Default: true - errors are logged.
-
getLogGroup
(experimental) The CloudWatch log group where log streams will be created to hold error logs.Default: - if `logging` is set to `true`, a log group will be created for you.
-
getMode
(experimental) Indicates the mode by which incoming records should be backed up to S3, if any.If
bucket
is provided, this will be implicitly set toBackupMode.ALL
.Default: - If `bucket` is provided, the default will be `BackupMode.ALL`. Otherwise, source records are not backed up to S3.
-
builder
- Returns:
- a
DestinationS3BackupProps.Builder
ofDestinationS3BackupProps
-