@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:33.522Z") @Stability(value=Experimental) public enum BackupMode extends Enum<BackupMode>
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.core.*;
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();
| Enum Constant and Description |
|---|
ALL
(experimental) All records are backed up.
|
FAILED
(experimental) Only records that failed to deliver or transform are backed up.
|
| Modifier and Type | Method and Description |
|---|---|
static BackupMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BackupMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Experimental) public static final BackupMode ALL
@Stability(value=Experimental) public static final BackupMode FAILED
public static BackupMode[] values()
for (BackupMode c : BackupMode.values()) System.out.println(c);
public static BackupMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.