aws.kinesis.list_shards
Example SQL Queries
SELECT * FROMaws.kinesis.list_shards;Description
Lists the shards in a stream and provides information about each shard. This operation has a limit of 1000 transactions per second per data stream.
When invoking this API, you must use either the StreamARN or the StreamName parameter, or both. It is recommended that you use the StreamARN input parameter when you invoke this API.
This action does not list expired shards. For information about expired shards, see Data Routing, Data Persistence, and Shard State after a Reshard.
This API is a new operation that is used by the Amazon Kinesis Client Library (KCL). If you have a fine-grained IAM policy that only allows specific operations, you must update your policy to allow calls to this API. For more information, see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM.
Table Definition
| Column Name | Column Data Type |
|---|---|
| exclusive_start_shard_id Input Column Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately follows ExclusiveStartShardId. If you don't specify this parameter, the default behavior is for ListShards to list the shards starting with the first one in the stream. You cannot specify this parameter if you specify NextToken. | VARCHAR |
| shard_filter Input Column Enables you to filter out the response of the ListShards API. You can only specify one filter at a time. If you use the ShardFilter parameter when invoking the ListShards API, the Type is the required property and must be specified. If you specify the AT_TRIM_HORIZON, FROM_TRIM_HORIZON, or AT_LATEST types, you do not need to specify either the ShardId or the Timestamp optional properties. If you specify the AFTER_SHARD_ID type, you must also provide the value for the optional ShardId property. The ShardId property is identical in fuctionality to the ExclusiveStartShardId parameter of the ListShards API. When ShardId property is specified, the response includes the shards starting with the shard whose ID immediately follows the ShardId that you provided. If you specify the AT_TIMESTAMP or FROM_TIMESTAMP_ID type, you must also provide the value for the optional Timestamp property. If you specify the AT_TIMESTAMP type, then all shards that were open at the provided timestamp are returned. If you specify the FROM_TIMESTAMP type, then all shards starting from the provided timestamp to TIP are returned. | STRUCT( |
Show child fields
| |
| stream_arn Input Column The ARN of the stream. | VARCHAR |
| stream_creation_timestamp Input Column Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the shards for. You cannot specify this parameter if you specify the NextToken parameter. | TIMESTAMP_S |
| stream_name Input Column The name of the data stream whose shards you want to list. You cannot specify this parameter if you specify the NextToken parameter. | VARCHAR |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| _aws_region Input Column The AWS region to use. | VARCHAR |
| adjacent_parent_shard_id The shard ID of the shard adjacent to the shard's parent. | VARCHAR |
| hash_key_range The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers. | STRUCT( |
Show child fields
| |
| parent_shard_id The shard ID of the shard's parent. | VARCHAR |
| sequence_number_range The range of possible sequence numbers for the shard. | STRUCT( |
Show child fields
| |
| shard_id The unique identifier of the shard within the stream. | VARCHAR |