CfnStreamPropsMixin

class aws_cdk.mixins_preview.aws_kinesis.mixins.CfnStreamPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a Kinesis stream that captures and transports data records that are emitted from data sources.

For information about creating streams, see CreateStream in the Amazon Kinesis API Reference.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html

CloudformationResource:

AWS::Kinesis::Stream

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_kinesis import mixins as kinesis_mixins

cfn_stream_props_mixin = kinesis_mixins.CfnStreamPropsMixin(kinesis_mixins.CfnStreamMixinProps(
    desired_shard_level_metrics=["desiredShardLevelMetrics"],
    max_record_size_in_ki_b=123,
    name="name",
    retention_period_hours=123,
    shard_count=123,
    stream_encryption=kinesis_mixins.CfnStreamPropsMixin.StreamEncryptionProperty(
        encryption_type="encryptionType",
        key_id="keyId"
    ),
    stream_mode_details=kinesis_mixins.CfnStreamPropsMixin.StreamModeDetailsProperty(
        stream_mode="streamMode"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    warm_throughput_mi_bps=123
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Kinesis::Stream.

Parameters:
  • props (Union[CfnStreamMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['desiredShardLevelMetrics', 'maxRecordSizeInKiB', 'name', 'retentionPeriodHours', 'shardCount', 'streamEncryption', 'streamModeDetails', 'tags', 'warmThroughputMiBps']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

StreamEncryptionProperty

class CfnStreamPropsMixin.StreamEncryptionProperty(*, encryption_type=None, key_id=None)

Bases: object

Enables or updates server-side encryption using an AWS KMS key for a specified stream.

When invoking this API, you must use either the StreamARN or the StreamName parameter, or both. It is recommended that you use the StreamARN input parameter when you invoke this API.

Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to UPDATING . After the update is complete, Kinesis Data Streams sets the status of the stream back to ACTIVE . Updating or applying encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is UPDATING . Once the status of the stream is ACTIVE , encryption begins for records written to the stream.

API Limits: You can successfully apply a new AWS KMS key for server-side encryption 25 times in a rolling 24-hour period.

Note: It can take up to 5 seconds after the stream is in an ACTIVE status before all records written to the stream are encrypted. After you enable encryption, you can verify that encryption is applied by inspecting the API response from PutRecord or PutRecords .

Parameters:
  • encryption_type (Optional[str]) – The encryption type to use. The only valid value is KMS .

  • key_id (Optional[str]) – The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by “alias/”.You can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis . - Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 - Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName - Globally unique key ID example: 12345678-1234-1234-1234-123456789012 - Alias name example: alias/MyAliasName - Master key owned by Kinesis Data Streams: alias/aws/kinesis

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_kinesis import mixins as kinesis_mixins

stream_encryption_property = kinesis_mixins.CfnStreamPropsMixin.StreamEncryptionProperty(
    encryption_type="encryptionType",
    key_id="keyId"
)

Attributes

encryption_type

The encryption type to use.

The only valid value is KMS .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html#cfn-kinesis-stream-streamencryption-encryptiontype

key_id

The GUID for the customer-managed AWS KMS key to use for encryption.

This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by “alias/”.You can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis .

  • Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012

  • Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

  • Globally unique key ID example: 12345678-1234-1234-1234-123456789012

  • Alias name example: alias/MyAliasName

  • Master key owned by Kinesis Data Streams: alias/aws/kinesis

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html#cfn-kinesis-stream-streamencryption-keyid

StreamModeDetailsProperty

class CfnStreamPropsMixin.StreamModeDetailsProperty(*, stream_mode=None)

Bases: object

Specifies the capacity mode to which you want to set your data stream.

Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

Parameters:

stream_mode (Optional[str]) – Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streammodedetails.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_kinesis import mixins as kinesis_mixins

stream_mode_details_property = kinesis_mixins.CfnStreamPropsMixin.StreamModeDetailsProperty(
    stream_mode="streamMode"
)

Attributes

stream_mode

Specifies the capacity mode to which you want to set your data stream.

Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streammodedetails.html#cfn-kinesis-stream-streammodedetails-streammode

WarmThroughputObjectProperty

class CfnStreamPropsMixin.WarmThroughputObjectProperty(*, current_mi_bps=None, target_mi_bps=None)

Bases: object

Represents the warm throughput configuration on the stream.

This is only present for On-Demand Kinesis Data Streams in accounts that have MinimumThroughputBillingCommitment enabled.

Parameters:
  • current_mi_bps (Union[int, float, None]) – The current warm throughput value on the stream. This is the write throughput in MiBps that the stream is currently scaled to handle.

  • target_mi_bps (Union[int, float, None]) – The target warm throughput value on the stream. This indicates that the stream is currently scaling towards this target value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-warmthroughputobject.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_kinesis import mixins as kinesis_mixins

warm_throughput_object_property = kinesis_mixins.CfnStreamPropsMixin.WarmThroughputObjectProperty(
    current_mi_bps=123,
    target_mi_bps=123
)

Attributes

current_mi_bps

The current warm throughput value on the stream.

This is the write throughput in MiBps that the stream is currently scaled to handle.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-warmthroughputobject.html#cfn-kinesis-stream-warmthroughputobject-currentmibps

target_mi_bps

The target warm throughput value on the stream.

This indicates that the stream is currently scaling towards this target value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-warmthroughputobject.html#cfn-kinesis-stream-warmthroughputobject-targetmibps