interface StreamProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Kinesis.StreamProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awskinesis#StreamProps |
Java | software.amazon.awscdk.services.kinesis.StreamProps |
Python | aws_cdk.aws_kinesis.StreamProps |
TypeScript (source) | aws-cdk-lib » aws_kinesis » StreamProps |
Properties for a Kinesis Stream.
Example
const key = new kms.Key(this, 'MyKey');
new kinesis.Stream(this, 'MyEncryptedStream', {
encryption: kinesis.StreamEncryption.KMS,
encryptionKey: key,
});
Properties
Name | Type | Description |
---|---|---|
encryption? | Stream | The kind of server-side encryption to apply to this stream. |
encryption | IKey | External KMS key to use for stream encryption. |
removal | Removal | Policy to apply when the stream is removed from the stack. |
retention | Duration | The number of hours for the data records that are stored in shards to remain accessible. |
shard | number | The number of shards for the stream. |
stream | Stream | The capacity mode of this stream. |
stream | string | Enforces a particular physical stream name. |
encryption?
Type:
Stream
(optional, default: StreamEncryption.KMS if encrypted Streams are supported in the region
or StreamEncryption.UNENCRYPTED otherwise.
StreamEncryption.KMS if an encryption key is supplied through the encryptionKey property)
The kind of server-side encryption to apply to this stream.
If you choose KMS, you can specify a KMS key via encryptionKey
. If
encryption key is not specified, a key will automatically be created.
encryptionKey?
Type:
IKey
(optional, default: Kinesis Data Streams master key ('/alias/aws/kinesis').
If encryption is set to StreamEncryption.KMS and this property is undefined, a new KMS key
will be created and associated with this stream.)
External KMS key to use for stream encryption.
The 'encryption' property must be set to "Kms".
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.RETAIN)
Policy to apply when the stream is removed from the stack.
retentionPeriod?
Type:
Duration
(optional, default: Duration.hours(24))
The number of hours for the data records that are stored in shards to remain accessible.
shardCount?
Type:
number
(optional, default: 1)
The number of shards for the stream.
Can only be provided if streamMode is Provisioned.
streamMode?
Type:
Stream
(optional, default: StreamMode.PROVISIONED)
The capacity mode of this stream.
streamName?
Type:
string
(optional, default:
Enforces a particular physical stream name.