Class CfnStreamConsumer

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:03.501Z") @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 .

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();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnStreamConsumerProps props)
      Parameters:
      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
      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.
    • 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()
      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.