KeyspacesStreams / Client / get_stream

get_stream

KeyspacesStreams.Client.get_stream(**kwargs)

Returns detailed information about a specific data capture stream for an Amazon Keyspaces table. The information includes the stream’s Amazon Resource Name (ARN), creation time, current status, retention period, shard composition, and associated table details. This operation helps you monitor and manage the configuration of your Amazon Keyspaces data streams.

See also: AWS API Documentation

Request Syntax

response = client.get_stream(
    streamArn='string',
    maxResults=123,
    shardFilter={
        'type': 'CHILD_SHARDS',
        'shardId': 'string'
    },
    nextToken='string'
)
Parameters:
  • streamArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the stream for which detailed information is requested. This uniquely identifies the specific stream you want to get information about.

  • maxResults (integer) – The maximum number of shard objects to return in a single GetStream request. Default value is 100. The minimum value is 1 and the maximum value is 1000.

  • shardFilter (dict) –

    Optional filter criteria to apply when retrieving shards. You can filter shards based on their state or other attributes to narrow down the results returned by the GetStream operation.

    • type (string) –

      The type of shard filter to use, which determines how the shardId parameter is interpreted.

    • shardId (string) –

      The identifier of a specific shard used to filter results based on the specified filter type.

  • nextToken (string) – An optional pagination token provided by a previous GetStream operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by maxResults.

Return type:

dict

Returns:

Response Syntax

{
    'streamArn': 'string',
    'streamLabel': 'string',
    'streamStatus': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED',
    'streamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY',
    'creationRequestDateTime': datetime(2015, 1, 1),
    'keyspaceName': 'string',
    'tableName': 'string',
    'shards': [
        {
            'shardId': 'string',
            'sequenceNumberRange': {
                'startingSequenceNumber': 'string',
                'endingSequenceNumber': 'string'
            },
            'parentShardIds': [
                'string',
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • streamArn (string) –

      The Amazon Resource Name (ARN) that uniquely identifies the stream within Amazon Keyspaces. This ARN can be used in other API operations to reference this specific stream.

    • streamLabel (string) –

      A timestamp that serves as a unique identifier for this stream, used for debugging and monitoring purposes. The stream label represents the point in time when the stream was created.

    • streamStatus (string) –

      The current status of the stream. Values can be ENABLING, ENABLED, DISABLING, or DISABLED. Operations on the stream depend on its current status.

    • streamViewType (string) –

      The format of the data records in this stream. Currently, this can be one of the following options:

      • NEW_AND_OLD_IMAGES - both versions of the row, before and after the change. This is the default.

      • NEW_IMAGE - the version of the row after the change.

      • OLD_IMAGE - the version of the row before the change.

      • KEYS_ONLY - the partition and clustering keys of the row that was changed.

    • creationRequestDateTime (datetime) –

      The date and time when the request to create this stream was issued. The value is represented in ISO 8601 format.

    • keyspaceName (string) –

      The name of the keyspace containing the table associated with this stream. The keyspace name is part of the table’s hierarchical identifier in Amazon Keyspaces.

    • tableName (string) –

      The name of the table associated with this stream. The stream captures changes to rows in this Amazon Keyspaces table.

    • shards (list) –

      An array of shard objects associated with this stream. Each shard contains a subset of the stream’s data records and has its own unique identifier. The collection of shards represents the complete stream data.

      • (dict) –

        Represents a uniquely identified group of change records within a change data capture stream for Amazon Keyspaces.

        • shardId (string) –

          A unique identifier for this shard within the stream.

        • sequenceNumberRange (dict) –

          The range of sequence numbers contained within this shard.

          • startingSequenceNumber (string) –

            The starting sequence number of the range.

          • endingSequenceNumber (string) –

            The ending sequence number of the range, which may be null for open-ended ranges.

        • parentShardIds (list) –

          The identifiers of parent shards that this shard evolved from, if this shard was created through resharding.

          • (string) –

    • nextToken (string) –

      A pagination token that can be used in a subsequent GetStream request. This token is returned if the response contains more shards than can be returned in a single response.

Exceptions

  • KeyspacesStreams.Client.exceptions.ThrottlingException

  • KeyspacesStreams.Client.exceptions.AccessDeniedException

  • KeyspacesStreams.Client.exceptions.InternalServerException

  • KeyspacesStreams.Client.exceptions.ValidationException

  • KeyspacesStreams.Client.exceptions.ResourceNotFoundException