stream_consumers
Creates, updates, deletes or gets a stream_consumer resource or lists stream_consumers in a region
Overview
| Name | stream_consumers |
| Type | Resource |
| Description | Resource Type definition for AWS::Kinesis::StreamConsumer |
| Id | awscc.kinesis.stream_consumers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
consumer_creation_timestamp | string | Timestamp when the consumer was created. |
consumer_name | string | The 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_arn | string | The 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_status | string | A consumer can't read data while in the CREATING or DELETING states. Valid Values: CREATING | DELETING | ACTIVE |
stream_arn | string | The Amazon resource name (ARN) of the Kinesis data stream that you want to register the consumer with. |
tags | array | An arbitrary set of tags (key–value pairs) to associate with the Kinesis consumer. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
consumer_arn | string | The 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. |
region | string | AWS region. |
For more information, see AWS::Kinesis::StreamConsumer.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | stream_consumers | INSERT | ConsumerName, StreamARN, region |
delete_resource | stream_consumers | DELETE | Identifier, region |
list_resources | stream_consumers_list_only | SELECT | region |
get_resource | stream_consumers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all stream_consumers in a region.
SELECT
region,
consumer_arn
FROM awscc.kinesis.stream_consumers_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new stream_consumer resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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
;
/*+ create */
INSERT INTO awscc.kinesis.stream_consumers (
ConsumerName,
StreamARN,
Tags,
region
)
SELECT
'{{ consumer_name }}',
'{{ stream_arn }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: stream_consumer
props:
- name: consumer_name
value: '{{ consumer_name }}'
- name: stream_arn
value: '{{ stream_arn }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
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:
| Parameter | Description |
|---|---|
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:
- Read
- Create
- List
- Delete
kinesis:DescribeStreamConsumer,
kinesis:ListTagsForResource
kinesis:RegisterStreamConsumer,
kinesis:DescribeStreamConsumer,
kinesis:TagResource
kinesis:ListStreamConsumers
kinesis:DeregisterStreamConsumer,
kinesis:DescribeStreamConsumer,
kinesis:UntagResource