Class CfnStreamConsumer

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.616Z") @Stability(Stable) public class CfnStreamConsumer extends CfnResource implements IInspectable
A CloudFormation AWS::Kinesis::StreamConsumer.

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 .

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.*;
 CfnStreamConsumer cfnStreamConsumer = CfnStreamConsumer.Builder.create(this, "MyCfnStreamConsumer")
         .consumerName("consumerName")
         .streamArn("streamArn")
         .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

    • CfnStreamConsumer

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

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

      @Stability(Stable) public CfnStreamConsumer(@NotNull Construct scope, @NotNull String id, @NotNull CfnStreamConsumerProps props)
      Create a new AWS::Kinesis::StreamConsumer.

      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.
      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.
    • 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.
    • 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()
      Overrides:
      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.