Class Compression
(experimental) Possible compression options Kinesis Data Firehose can use to compress data on delivery.
Inheritance
Namespace: Amazon.CDK.AWS.KinesisFirehose.Destinations
Assembly: Amazon.CDK.AWS.KinesisFirehose.Destinations.dll
Syntax (csharp)
public class Compression : DeputyBase
Syntax (vb)
Public Class Compression
Inherits DeputyBase
Remarks
Stability: Experimental
ExampleMetadata: lit=../aws-kinesisfirehose-destinations/test/integ.s3-bucket.lit.ts infused
Examples
using Path;
using Amazon.CDK.AWS.KinesisFirehose;
using Amazon.CDK.AWS.KMS;
using Amazon.CDK.AWS.Lambda.Nodejs;
using Amazon.CDK.AWS.Logs;
using Amazon.CDK.AWS.S3;
using Amazon.CDK;
using Amazon.CDK.AWS.KinesisFirehose.Destinations;
var app = new App();
var stack = new Stack(app, "aws-cdk-firehose-delivery-stream-s3-all-properties");
var bucket = new Bucket(stack, "Bucket", new BucketProps {
RemovalPolicy = RemovalPolicy.DESTROY,
AutoDeleteObjects = true
});
var backupBucket = new Bucket(stack, "BackupBucket", new BucketProps {
RemovalPolicy = RemovalPolicy.DESTROY,
AutoDeleteObjects = true
});
var logGroup = new LogGroup(stack, "LogGroup", new LogGroupProps {
RemovalPolicy = RemovalPolicy.DESTROY
});
var dataProcessorFunction = new NodejsFunction(stack, "DataProcessorFunction", new NodejsFunctionProps {
Entry = Join(__dirname, "lambda-data-processor.js"),
Timeout = Duration.Minutes(1)
});
var processor = new LambdaFunctionProcessor(dataProcessorFunction, new DataProcessorProps {
BufferInterval = Duration.Seconds(60),
BufferSize = Size.Mebibytes(1),
Retries = 1
});
var key = new Key(stack, "Key", new KeyProps {
RemovalPolicy = RemovalPolicy.DESTROY
});
var backupKey = new Key(stack, "BackupKey", new KeyProps {
RemovalPolicy = RemovalPolicy.DESTROY
});
new DeliveryStream(stack, "Delivery Stream", new DeliveryStreamProps {
Destinations = new [] { new S3Bucket(bucket, new S3BucketProps {
Logging = true,
LogGroup = logGroup,
Processor = processor,
Compression = Compression.GZIP,
DataOutputPrefix = "regularPrefix",
ErrorOutputPrefix = "errorPrefix",
BufferingInterval = Duration.Seconds(60),
BufferingSize = Size.Mebibytes(1),
EncryptionKey = key,
S3Backup = new DestinationS3BackupProps {
Mode = BackupMode.ALL,
Bucket = backupBucket,
Compression = Compression.ZIP,
DataOutputPrefix = "backupPrefix",
ErrorOutputPrefix = "backupErrorPrefix",
BufferingInterval = Duration.Seconds(60),
BufferingSize = Size.Mebibytes(1),
EncryptionKey = backupKey
}
}) }
});
app.Synth();
Synopsis
Constructors
Compression(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Compression(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
GZIP | (experimental) gzip. |
HADOOP_SNAPPY | (experimental) Hadoop-compatible Snappy. |
SNAPPY | (experimental) Snappy. |
Value | (experimental) the string value of the Compression. |
ZIP | (experimental) ZIP. |
Methods
Of(String) | (experimental) Creates a new Compression instance with a custom value. |
Constructors
Compression(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Compression(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Compression(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Compression(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
GZIP
(experimental) gzip.
public static Compression GZIP { get; }
Property Value
Remarks
Stability: Experimental
HADOOP_SNAPPY
(experimental) Hadoop-compatible Snappy.
public static Compression HADOOP_SNAPPY { get; }
Property Value
Remarks
Stability: Experimental
SNAPPY
(experimental) Snappy.
public static Compression SNAPPY { get; }
Property Value
Remarks
Stability: Experimental
Value
(experimental) the string value of the Compression.
public virtual string Value { get; }
Property Value
System.String
Remarks
Stability: Experimental
ZIP
(experimental) ZIP.
public static Compression ZIP { get; }
Property Value
Remarks
Stability: Experimental
Methods
Of(String)
(experimental) Creates a new Compression instance with a custom value.
public static Compression Of(string value)
Parameters
- value System.String
Returns
Remarks
Stability: Experimental