StreamProps
- class aws_cdk.aws_kinesis.StreamProps(*, encryption=None, encryption_key=None, removal_policy=None, retention_period=None, shard_count=None, stream_mode=None, stream_name=None)
Bases:
object
Properties for a Kinesis Stream.
- Parameters:
encryption (
Optional
[StreamEncryption
]) – The kind of server-side encryption to apply to this stream. If you choose KMS, you can specify a KMS key viaencryptionKey
. If encryption key is not specified, a key will automatically be created. 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 propertyencryption_key (
Optional
[IKey
]) – External KMS key to use for stream encryption. The ‘encryption’ property must be set to “Kms”. 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.removal_policy (
Optional
[RemovalPolicy
]) – Policy to apply when the stream is removed from the stack. Default: RemovalPolicy.RETAINretention_period (
Optional
[Duration
]) – The number of hours for the data records that are stored in shards to remain accessible. Default: Duration.hours(24)shard_count (
Union
[int
,float
,None
]) – The number of shards for the stream. Can only be provided if streamMode is Provisioned. Default: 1stream_mode (
Optional
[StreamMode
]) – The capacity mode of this stream. Default: StreamMode.PROVISIONEDstream_name (
Optional
[str
]) – Enforces a particular physical stream name. Default:
- ExampleMetadata:
infused
Example:
key = kms.Key(self, "MyKey") kinesis.Stream(self, "MyEncryptedStream", encryption=kinesis.StreamEncryption.KMS, encryption_key=key )
Attributes
- encryption
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.- 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
- encryption_key
External KMS key to use for stream encryption.
The ‘encryption’ property must be set to “Kms”.
- 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.
- removal_policy
Policy to apply when the stream is removed from the stack.
- Default:
RemovalPolicy.RETAIN
- retention_period
The number of hours for the data records that are stored in shards to remain accessible.
- Default:
Duration.hours(24)
- shard_count
The number of shards for the stream.
Can only be provided if streamMode is Provisioned.
- Default:
1
- stream_mode
The capacity mode of this stream.
- Default:
StreamMode.PROVISIONED
- stream_name
Enforces a particular physical stream name.
- Default: