Kinesis / Client / list_streams

list_streams#

Kinesis.Client.list_streams(**kwargs)#

Lists your Kinesis data streams.

The number of streams may be too large to return from a single call to ListStreams. You can limit the number of returned streams using the Limit parameter. If you do not specify a value for the Limit parameter, Kinesis Data Streams uses the default limit, which is currently 100.

You can detect if there are more streams available to list by using the HasMoreStreams flag from the returned output. If there are more streams available, you can request more streams by using the name of the last stream returned by the ListStreams request in the ExclusiveStartStreamName parameter in a subsequent request to ListStreams. The group of stream names returned by the subsequent request is then added to the list. You can continue this process until all the stream names have been collected in the list.

ListStreams has a limit of five transactions per second per account.

See also: AWS API Documentation

Request Syntax

response = client.list_streams(
    Limit=123,
    ExclusiveStartStreamName='string',
    NextToken='string'
)
Parameters:
  • Limit (integer) – The maximum number of streams to list. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.

  • ExclusiveStartStreamName (string) – The name of the stream to start the list with.

  • NextToken (string) –

Return type:

dict

Returns:

Response Syntax

{
    'StreamNames': [
        'string',
    ],
    'HasMoreStreams': True|False,
    'NextToken': 'string',
    'StreamSummaries': [
        {
            'StreamName': 'string',
            'StreamARN': 'string',
            'StreamStatus': 'CREATING'|'DELETING'|'ACTIVE'|'UPDATING',
            'StreamModeDetails': {
                'StreamMode': 'PROVISIONED'|'ON_DEMAND'
            },
            'StreamCreationTimestamp': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) –

    Represents the output for ListStreams.

    • StreamNames (list) –

      The names of the streams that are associated with the Amazon Web Services account making the ListStreams request.

      • (string) –

    • HasMoreStreams (boolean) –

      If set to true, there are more streams available to list.

    • NextToken (string) –

    • StreamSummaries (list) –

      • (dict) –

        The summary of a stream.

        • StreamName (string) –

          The name of a stream.

        • StreamARN (string) –

          The ARN of the stream.

        • StreamStatus (string) –

          The status of the stream.

        • StreamModeDetails (dict) –

          Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

          • StreamMode (string) –

            Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

        • StreamCreationTimestamp (datetime) –

          The timestamp at which the stream was created.

Exceptions

  • Kinesis.Client.exceptions.LimitExceededException

  • Kinesis.Client.exceptions.ExpiredNextTokenException

  • Kinesis.Client.exceptions.InvalidArgumentException