Class Stream.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Stream>
- Enclosing class:
- Stream
Stream
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static Stream.Builder
encryption
(StreamEncryption encryption) The kind of server-side encryption to apply to this stream.encryptionKey
(IKey encryptionKey) External KMS key to use for stream encryption.retentionPeriod
(Duration retentionPeriod) The number of hours for the data records that are stored in shards to remain accessible.shardCount
(Number shardCount) The number of shards for the stream.streamMode
(StreamMode streamMode) The capacity mode of this stream.streamName
(String streamName) Enforces a particular physical stream name.
-
Method Details
-
create
@Stability(Stable) public static Stream.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Stream.Builder
.
-
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
- Parameters:
encryption
- The kind of server-side encryption to apply to this stream. This parameter is required.- Returns:
this
-
encryptionKey
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.
- Parameters:
encryptionKey
- External KMS key to use for stream encryption. This parameter is required.- Returns:
this
-
retentionPeriod
The number of hours for the data records that are stored in shards to remain accessible.Default: Duration.hours(24)
- Parameters:
retentionPeriod
- The number of hours for the data records that are stored in shards to remain accessible. This parameter is required.- Returns:
this
-
shardCount
The number of shards for the stream.Can only be provided if streamMode is Provisioned.
Default: 1
- Parameters:
shardCount
- The number of shards for the stream. This parameter is required.- Returns:
this
-
streamMode
The capacity mode of this stream.Default: StreamMode.PROVISIONED
- Parameters:
streamMode
- The capacity mode of this stream. This parameter is required.- Returns:
this
-
streamName
Enforces a particular physical stream name.Default:
- Parameters:
streamName
- Enforces a particular physical stream name. This parameter is required.- Returns:
this
-
build
-