Skip to main content

stream_consumers

Creates, updates, deletes or gets a stream_consumer resource or lists stream_consumers in a region

Overview

Namestream_consumers
TypeResource
DescriptionResource Type definition for AWS::Kinesis::StreamConsumer
Idawscc.kinesis.stream_consumers

Fields

NameDatatypeDescription
consumer_creation_timestampstringTimestamp when the consumer was created.
consumer_namestringThe name of the Kinesis Stream Consumer. For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.
consumer_arnstringThe ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.
consumer_statusstringA consumer can't read data while in the CREATING or DELETING states. Valid Values: CREATING | DELETING | ACTIVE
stream_arnstringThe Amazon resource name (ARN) of the Kinesis data stream that you want to register the consumer with.
tagsarrayAn arbitrary set of tags (key–value pairs) to associate with the Kinesis consumer.
regionstringAWS region.

For more information, see AWS::Kinesis::StreamConsumer.

Methods

NameResourceAccessible byRequired Params
create_resourcestream_consumersINSERTConsumerName, StreamARN, region
delete_resourcestream_consumersDELETEIdentifier, region
list_resourcesstream_consumers_list_onlySELECTregion
get_resourcestream_consumersSELECTIdentifier, region

SELECT examples

Gets all properties from an individual stream_consumer.

SELECT
region,
consumer_creation_timestamp,
consumer_name,
consumer_arn,
consumer_status,
stream_arn,
tags
FROM awscc.kinesis.stream_consumers
WHERE
region = '{{ region }}' AND
Identifier = '{{ consumer_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new stream_consumer resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.kinesis.stream_consumers (
ConsumerName,
StreamARN,
region
)
SELECT
'{{ consumer_name }}',
'{{ stream_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.kinesis.stream_consumers
WHERE
Identifier = '{{ consumer_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the stream_consumers resource, the following permissions are required:

kinesis:DescribeStreamConsumer,
kinesis:ListTagsForResource