Class CfnStreamConsumer

All Implemented Interfaces:
IInspectable,, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:03.656Z") @Stability(Stable) public class CfnStreamConsumer extends CfnResource implements IInspectable
Use the AWS CloudFormation AWS::Kinesis::StreamConsumer resource to register a consumer with a Kinesis data stream.

The consumer you register can then call SubscribeToShard to receive data from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every shard you subscribe to. This rate is unaffected by the total number of consumers that read from the same stream.

You can register up to five consumers per stream. However, you can request a limit increase using the Kinesis Data Streams limits form . A given consumer can only be registered with one stream at a time.

For more information, see Using Consumers with Enhanced Fan-Out .


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 CfnStreamConsumer cfnStreamConsumer = CfnStreamConsumer.Builder.create(this, "MyCfnStreamConsumer")

See Also:
  • Field Details


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

    • CfnStreamConsumer

      protected CfnStreamConsumer( objRef)
    • CfnStreamConsumer

      protected CfnStreamConsumer( initializationMode)
    • CfnStreamConsumer

      @Stability(Stable) public CfnStreamConsumer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnStreamConsumerProps props)
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. 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
      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)
      renderProperties in class CfnResource
      props - This parameter is required.
    • getAttrConsumerArn

      @Stability(Stable) @NotNull public String getAttrConsumerArn()
      When you register a consumer, Kinesis Data Streams generates an ARN for it.

      You need this ARN to be able to call SubscribeToShard .

      If you delete a consumer and then create a new one with the same name, it won't have the same ARN. That's because consumer ARNs contain the creation timestamp. This is important to keep in mind if you have IAM policies that reference consumer ARNs.

    • getAttrConsumerCreationTimestamp

      @Stability(Stable) @NotNull public String getAttrConsumerCreationTimestamp()
      The time at which the consumer was created.
    • getAttrConsumerName

      @Stability(Stable) @NotNull public String getAttrConsumerName()
      The name you gave the consumer when you registered it.
    • getAttrConsumerStatus

      @Stability(Stable) @NotNull public String getAttrConsumerStatus()
      A consumer can't read data while in the CREATING or DELETING states.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getAttrStreamArn

      @Stability(Stable) @NotNull public String getAttrStreamArn()
      The ARN of the data stream with which the consumer is registered.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getConsumerName()
      The name of the consumer is something you choose when you register the consumer.
    • setConsumerName

      @Stability(Stable) public void setConsumerName(@NotNull String value)
      The name of the consumer is something you choose when you register the consumer.
    • getStreamArn

      @Stability(Stable) @NotNull public String getStreamArn()
      The ARN of the stream with which you registered the consumer.
    • setStreamArn

      @Stability(Stable) public void setStreamArn(@NotNull String value)
      The ARN of the stream with which you registered the consumer.