Class CfnStreamConsumer
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
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();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnStreamConsumer(Construct scope, String id, CfnStreamConsumerProps props) Create a newAWS::Kinesis::StreamConsumer.protectedCfnStreamConsumer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnStreamConsumer(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionWhen you register a consumer, Kinesis Data Streams generates an ARN for it.The time at which the consumer was created.The name you gave the consumer when you registered it.A consumer can't read data while in theCREATINGorDELETINGstates.The ARN of the data stream with which the consumer is registered.The name of the consumer is something you choose when you register the consumer.The ARN of the stream with which you registered the consumer.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetConsumerName(String value) The name of the consumer is something you choose when you register the consumer.voidsetStreamArn(String value) The ARN of the stream with which you registered the consumer.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 newAWS::Kinesis::StreamConsumer.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
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
The time at which the consumer was created. -
getAttrConsumerName
The name you gave the consumer when you registered it. -
getAttrConsumerStatus
A consumer can't read data while in theCREATINGorDELETINGstates. -
getAttrStreamArn
The ARN of the data stream with which the consumer is registered. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getConsumerName
The name of the consumer is something you choose when you register the consumer. -
setConsumerName
The name of the consumer is something you choose when you register the consumer. -
getStreamArn
The ARN of the stream with which you registered the consumer. -
setStreamArn
The ARN of the stream with which you registered the consumer.
-