@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:51.785Z") @Stability(value=Experimental) public class Compression extends software.amazon.jsii.JsiiObject
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();
| Modifier and Type | Field and Description |
|---|---|
static Compression |
GZIP
(experimental) gzip.
|
static Compression |
HADOOP_SNAPPY
(experimental) Hadoop-compatible Snappy.
|
static Compression |
SNAPPY
(experimental) Snappy.
|
static Compression |
ZIP
(experimental) ZIP.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Compression(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Compression(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getValue()
(experimental) the string value of the Compression.
|
static Compression |
of(String value)
(experimental) Creates a new Compression instance with a custom value.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Experimental) public static final Compression GZIP
@Stability(value=Experimental) public static final Compression HADOOP_SNAPPY
@Stability(value=Experimental) public static final Compression SNAPPY
@Stability(value=Experimental) public static final Compression ZIP
protected Compression(software.amazon.jsii.JsiiObjectRef objRef)
protected Compression(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) @NotNull public static Compression of(@NotNull String value)
value - This parameter is required.@Stability(value=Experimental) @NotNull public String getValue()
Copyright © 2022. All rights reserved.