Class StreamProps.Builder
java.lang.Object
software.amazon.awscdk.services.kinesis.StreamProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<StreamProps>
- Enclosing interface:
StreamProps
@Stability(Stable)
public static final class StreamProps.Builder
extends Object
implements software.amazon.jsii.Builder<StreamProps>
A builder for
StreamProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.encryption
(StreamEncryption encryption) Sets the value ofStreamProps.getEncryption()
encryptionKey
(IKey encryptionKey) Sets the value ofStreamProps.getEncryptionKey()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofStreamProps.getRemovalPolicy()
retentionPeriod
(Duration retentionPeriod) Sets the value ofStreamProps.getRetentionPeriod()
shardCount
(Number shardCount) Sets the value ofStreamProps.getShardCount()
streamMode
(StreamMode streamMode) Sets the value ofStreamProps.getStreamMode()
streamName
(String streamName) Sets the value ofStreamProps.getStreamName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
encryption
Sets the value ofStreamProps.getEncryption()
- Parameters:
encryption
- 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.- Returns:
this
-
encryptionKey
Sets the value ofStreamProps.getEncryptionKey()
- Parameters:
encryptionKey
- External KMS key to use for stream encryption. The 'encryption' property must be set to "Kms".- Returns:
this
-
removalPolicy
Sets the value ofStreamProps.getRemovalPolicy()
- Parameters:
removalPolicy
- Policy to apply when the stream is removed from the stack.- Returns:
this
-
retentionPeriod
Sets the value ofStreamProps.getRetentionPeriod()
- Parameters:
retentionPeriod
- The number of hours for the data records that are stored in shards to remain accessible.- Returns:
this
-
shardCount
Sets the value ofStreamProps.getShardCount()
- Parameters:
shardCount
- The number of shards for the stream. Can only be provided if streamMode is Provisioned.- Returns:
this
-
streamMode
Sets the value ofStreamProps.getStreamMode()
- Parameters:
streamMode
- The capacity mode of this stream.- Returns:
this
-
streamName
Sets the value ofStreamProps.getStreamName()
- Parameters:
streamName
- Enforces a particular physical stream name.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<StreamProps>
- Returns:
- a new instance of
StreamProps
- Throws:
NullPointerException
- if any required attribute was not provided
-