Class CfnStream

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.612Z") @Stability(Stable) public class CfnStream extends CfnResource implements IInspectable
A CloudFormation AWS::Kinesis::Stream.

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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.kinesis.*;
 CfnStream cfnStream = CfnStream.Builder.create(this, "MyCfnStream")
         .name("name")
         .retentionPeriodHours(123)
         .shardCount(123)
         .streamEncryption(StreamEncryptionProperty.builder()
                 .encryptionType("encryptionType")
                 .keyId("keyId")
                 .build())
         .streamModeDetails(StreamModeDetailsProperty.builder()
                 .streamMode("streamMode")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnStream

      protected CfnStream(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnStream

      protected CfnStream(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnStream

      @Stability(Stable) public CfnStream(@NotNull Construct scope, @NotNull String id, @Nullable CfnStreamProps props)
      Create a new AWS::Kinesis::Stream.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
    • CfnStream

      @Stability(Stable) public CfnStream(@NotNull Construct scope, @NotNull String id)
      Create a new AWS::Kinesis::Stream.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon resource name (ARN) of the Kinesis stream, such as arn:aws:kinesis:us-east-2:123456789012:stream/mystream .
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      An arbitrary set of tags (key–value pairs) to associate with the Kinesis stream.

      For information about constraints for this property, see Tag Restrictions in the Amazon Kinesis Developer Guide .

    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the Kinesis stream.

      If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the stream name. For more information, see Name Type .

      If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the Kinesis stream.

      If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the stream name. For more information, see Name Type .

      If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

    • getRetentionPeriodHours

      @Stability(Stable) @Nullable public Number getRetentionPeriodHours()
      The number of hours for the data records that are stored in shards to remain accessible.

      The default value is 24. For more information about the stream retention period, see Changing the Data Retention Period in the Amazon Kinesis Developer Guide.

    • setRetentionPeriodHours

      @Stability(Stable) public void setRetentionPeriodHours(@Nullable Number value)
      The number of hours for the data records that are stored in shards to remain accessible.

      The default value is 24. For more information about the stream retention period, see Changing the Data Retention Period in the Amazon Kinesis Developer Guide.

    • getShardCount

      @Stability(Stable) @Nullable public Number getShardCount()
      The number of shards that the stream uses.

      For greater provisioned throughput, increase the number of shards.

    • setShardCount

      @Stability(Stable) public void setShardCount(@Nullable Number value)
      The number of shards that the stream uses.

      For greater provisioned throughput, increase the number of shards.

    • getStreamEncryption

      @Stability(Stable) @Nullable public Object getStreamEncryption()
      When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream.

      Removing this property from your stack template and updating your stack disables encryption.

    • setStreamEncryption

      @Stability(Stable) public void setStreamEncryption(@Nullable CfnStream.StreamEncryptionProperty value)
      When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream.

      Removing this property from your stack template and updating your stack disables encryption.

    • setStreamEncryption

      @Stability(Stable) public void setStreamEncryption(@Nullable IResolvable value)
      When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream.

      Removing this property from your stack template and updating your stack disables encryption.

    • getStreamModeDetails

      @Stability(Stable) @Nullable public Object getStreamModeDetails()
      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.

    • setStreamModeDetails

      @Stability(Stable) public void setStreamModeDetails(@Nullable IResolvable value)
      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.

    • setStreamModeDetails

      @Stability(Stable) public void setStreamModeDetails(@Nullable CfnStream.StreamModeDetailsProperty value)
      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.