streams
Creates, updates, deletes, gets or lists a streams resource.
Overview
| Name | streams |
| Type | Resource |
| Id | aws.dynamodbstreams.streams |
Fields
The following fields are returned by SELECT queries:
- describe_stream
- list_streams
| Name | Datatype | Description |
|---|---|---|
creation_request_date_time | string (date-time) | The date and time when the request to create this stream was issued. |
key_schema | array | The key attribute(s) of the stream's DynamoDB table. |
last_evaluated_shard_id | string | The shard ID of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request. If LastEvaluatedShardId is empty, then the "last page" of results has been processed and there is currently no more data to be retrieved. If LastEvaluatedShardId is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedShardId is empty. |
shards | array | The shards that comprise the stream. |
stream_arn | string | The Amazon Resource Name (ARN) for the stream. |
stream_label | string | A timestamp, in ISO 8601 format, for this stream. Note that LatestStreamLabel is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique: the Amazon Web Services customer ID. the table name the StreamLabel |
stream_status | string | Indicates the current status of the stream: ENABLING - Streams is currently being enabled on the DynamoDB table. ENABLED - the stream is enabled. DISABLING - Streams is currently being disabled on the DynamoDB table. DISABLED - the stream is disabled. (ENABLING, ENABLED, DISABLING, DISABLED) |
stream_view_type | string | Indicates the format of the records within this stream: KEYS_ONLY - only the key attributes of items that were modified in the DynamoDB table. NEW_IMAGE - entire items from the table, as they appeared after they were modified. OLD_IMAGE - entire items from the table, as they appeared before they were modified. NEW_AND_OLD_IMAGES - both the new and the old images of the items from the table. (NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES, KEYS_ONLY) |
table_name | string | The DynamoDB table with which the stream is associated. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
| Name | Datatype | Description |
|---|---|---|
last_evaluated_stream_arn | string | The stream ARN of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request. If LastEvaluatedStreamArn is empty, then the "last page" of results has been processed and there is no more data to be retrieved. If LastEvaluatedStreamArn is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedStreamArn is empty. |
streams | array | A list of stream descriptors associated with the current account and endpoint. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_stream | select | region | Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table. You can call DescribeStream at a maximum rate of 10 times per second. Each shard in the stream has a SequenceNumberRange associated with it. If the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber, then the shard is still open (able to receive more stream records). If both StartingSequenceNumber and EndingSequenceNumber are present, then that shard is closed and can no longer receive more data. | |
list_streams | select | region | Returns an array of stream ARNs associated with the current account and endpoint. If the TableName parameter is present, then ListStreams will return only the streams ARNs for that table. You can call ListStreams at a maximum rate of 5 times per second. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_stream
- list_streams
Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table. You can call DescribeStream at a maximum rate of 10 times per second. Each shard in the stream has a SequenceNumberRange associated with it. If the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber, then the shard is still open (able to receive more stream records). If both StartingSequenceNumber and EndingSequenceNumber are present, then that shard is closed and can no longer receive more data.
SELECT
creation_request_date_time,
key_schema,
last_evaluated_shard_id,
shards,
stream_arn,
stream_label,
stream_status,
stream_view_type,
table_name
FROM aws.dynamodbstreams.streams
WHERE region = '{{ region }}' -- required
;
Returns an array of stream ARNs associated with the current account and endpoint. If the TableName parameter is present, then ListStreams will return only the streams ARNs for that table. You can call ListStreams at a maximum rate of 5 times per second.
SELECT
last_evaluated_stream_arn,
streams
FROM aws.dynamodbstreams.streams
WHERE region = '{{ region }}' -- required
;