Queries the shard information about a stream.

Usage notes

Before data of a shard can be read, all data of the parent shard must be read.

Request syntax

message DescribeStreamRequest {
    required string stream_id = 1;
    optional string inclusive_start_shard_id = 2;
    optional int32 shard_limit = 3;
}           
Parameter Type Required Description
stream_id string Yes The ID of the stream.
inclusive_start_shard_id string No The ID of the start shard in the query.
shard_limit int32 No The maximum number of shards that you want to return for the query.

Response syntax

message DescribeStreamResponse {
    required string stream_id = 1;
    required int32 expiration_time = 2;
    required string table_name = 3;
    required int64 creation_time = 4;
    required StreamStatus stream_status = 5;
    repeated StreamShard shards = 6;
    optional string next_shard_id = 7;
}

message StreamShard {
    required string shard_id = 1;
    optional string parent_id = 2;
    optional string parent_sibling_id = 3;
}
            
Parameter Type Description
stream_id string The ID of the stream.
expiration_time int32 The time when the stream expires.
table_name string The name of the table to which the stream belongs.
creation_time int64 The time when the stream was created.
stream_status StreamStatus The status of the stream. Valid values: enabling and active.
shards StreamShard The shard information about the stream, including the shard ID, parent shard ID, and information about the shard that is adjacent to the parent shard. If parent shards are merged, this parameter is returned.
next_shard_id string The ID of the start shard in the next paging query.

Use Tablestore SDKs

Tablestore SDK for Java: DescribeStream