@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:43.229Z") 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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnStreamConsumer.Builder
A fluent builder for
CfnStreamConsumer . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnStreamConsumer(Construct scope,
java.lang.String id,
CfnStreamConsumerProps props)
Create a new `AWS::Kinesis::StreamConsumer`.
|
protected |
CfnStreamConsumer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnStreamConsumer(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrConsumerArn()
When you register a consumer, Kinesis Data Streams generates an ARN for it.
|
java.lang.String |
getAttrConsumerCreationTimestamp()
The time at which the consumer was created.
|
java.lang.String |
getAttrConsumerName()
The name you gave the consumer when you registered it.
|
java.lang.String |
getAttrConsumerStatus()
A consumer can't read data while in the `CREATING` or `DELETING` states.
|
java.lang.String |
getAttrStreamArn()
The ARN of the data stream with which the consumer is registered.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getConsumerName()
The name of the consumer is something you choose when you register the consumer.
|
java.lang.String |
getStreamArn()
The ARN of the stream with which you registered the consumer.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setConsumerName(java.lang.String value)
The name of the consumer is something you choose when you register the consumer.
|
void |
setStreamArn(java.lang.String value)
The ARN of the stream with which you registered the consumer.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnStreamConsumer(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnStreamConsumer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnStreamConsumer(Construct scope, java.lang.String id, CfnStreamConsumerProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrConsumerArn()
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.
public java.lang.String getAttrConsumerCreationTimestamp()
public java.lang.String getAttrConsumerName()
public java.lang.String getAttrConsumerStatus()
public java.lang.String getAttrStreamArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getConsumerName()
public void setConsumerName(java.lang.String value)
public java.lang.String getStreamArn()
public void setStreamArn(java.lang.String value)