Skip to content

ListShards

Source: src/AWS/Kinesis/ListShards.ts

Runtime binding for kinesis:ListShards.

Bind this operation to a Stream to enumerate its shards — typically the first step before obtaining a shard iterator and reading records. Provide the implementation with Effect.provide(AWS.Kinesis.ListShardsHttp).

// init
const listShards = yield* AWS.Kinesis.ListShards(stream);
// runtime
const result = yield* listShards();
const shardIds = (result.Shards ?? []).map((shard) => shard.ShardId);