Amazon Keyspaces Streams

2025/06/26 - Amazon Keyspaces Streams - 4 new api methods

Changes  This release adds change data capture (CDC) streams support through the new Amazon Keyspaces Streams API.

ListStreams (new) Link ¶

Returns a list of all data capture streams associated with your Amazon Keyspaces account or for a specific keyspace or table. The response includes information such as stream ARNs, table associations, creation timestamps, and current status. This operation helps you discover and manage all active data streams in your Amazon Keyspaces environment.

See also: AWS API Documentation

Request Syntax

client.list_streams(
    keyspaceName='string',
    tableName='string',
    maxResults=123,
    nextToken='string'
)
type keyspaceName:

string

param keyspaceName:

The name of the keyspace for which to list streams. If specified, only streams associated with tables in this keyspace are returned. If omitted, streams from all keyspaces are included in the results.

type tableName:

string

param tableName:

The name of the table for which to list streams. Must be used together with keyspaceName. If specified, only streams associated with this specific table are returned.

type maxResults:

integer

param maxResults:

The maximum number of streams to return in a single ListStreams request. Default value is 100. The minimum value is 1 and the maximum value is 1000.

type nextToken:

string

param nextToken:

An optional pagination token provided by a previous ListStreams operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by maxResults.

rtype:

dict

returns:

Response Syntax

{
    'streams': [
        {
            'streamArn': 'string',
            'keyspaceName': 'string',
            'tableName': 'string',
            'streamLabel': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • streams (list) --

      An array of stream objects, each containing summary information about a stream including its ARN, status, and associated table information. This list includes all streams that match the request criteria.

      • (dict) --

        Represents a change data capture stream for an Amazon Keyspaces table, which enables tracking and processing of data changes.

        • streamArn (string) --

          The Amazon Resource Name (ARN) that uniquely identifies this stream.

        • keyspaceName (string) --

          The name of the keyspace containing the table associated with this stream.

        • tableName (string) --

          The name of the table associated with this stream.

        • streamLabel (string) --

          A unique identifier for this stream that can be used in stream operations.

    • nextToken (string) --

      A pagination token that can be used in a subsequent ListStreams request. This token is returned if the response contains more streams than can be returned in a single response based on the MaxResults parameter.

GetStream (new) Link ¶

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

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

string

param streamArn:

[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.

type maxResults:

integer

param maxResults:

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.

type shardFilter:

dict

param shardFilter:

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.

type nextToken:

string

param nextToken:

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.

rtype:

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.

GetRecords (new) Link ¶

Retrieves data records from a specified shard in an Amazon Keyspaces data stream. This operation returns a collection of data records from the shard, including the primary key columns and information about modifications made to the captured table data. Each record represents a single data modification in the Amazon Keyspaces table and includes metadata about when the change occurred.

See also: AWS API Documentation

Request Syntax

client.get_records(
    shardIterator='string',
    maxResults=123
)
type shardIterator:

string

param shardIterator:

[REQUIRED]

The unique identifier of the shard iterator. A shard iterator specifies the position in the shard from which you want to start reading data records sequentially. You obtain this value by calling the GetShardIterator operation. Each shard iterator is valid for 5 minutes after creation.

type maxResults:

integer

param maxResults:

The maximum number of records to return in a single GetRecords request. Default value is 1000. You can specify a limit between 1 and 10000, but the actual number returned might be less than the specified maximum if the size of the data for the returned records exceeds the internal size limit.

rtype:

dict

returns:

Response Syntax

{
    'changeRecords': [
        {
            'eventVersion': 'string',
            'createdAt': datetime(2015, 1, 1),
            'origin': 'USER'|'REPLICATION'|'TTL',
            'partitionKeys': {
                'string': {
                    'asciiT': 'string',
                    'bigintT': 'string',
                    'blobT': b'bytes',
                    'boolT': True|False,
                    'counterT': 'string',
                    'dateT': 'string',
                    'decimalT': 'string',
                    'doubleT': 'string',
                    'floatT': 'string',
                    'inetT': 'string',
                    'intT': 'string',
                    'listT': [
                        {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'mapT': [
                        {
                            'key': {'... recursive ...'},
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'setT': [
                        {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'smallintT': 'string',
                    'textT': 'string',
                    'timeT': 'string',
                    'timestampT': 'string',
                    'timeuuidT': 'string',
                    'tinyintT': 'string',
                    'tupleT': [
                        {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'uuidT': 'string',
                    'varcharT': 'string',
                    'varintT': 'string',
                    'udtT': {
                        'string': {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        }
                    }
                }
            },
            'clusteringKeys': {
                'string': {
                    'asciiT': 'string',
                    'bigintT': 'string',
                    'blobT': b'bytes',
                    'boolT': True|False,
                    'counterT': 'string',
                    'dateT': 'string',
                    'decimalT': 'string',
                    'doubleT': 'string',
                    'floatT': 'string',
                    'inetT': 'string',
                    'intT': 'string',
                    'listT': [
                        {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'mapT': [
                        {
                            'key': {'... recursive ...'},
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'setT': [
                        {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'smallintT': 'string',
                    'textT': 'string',
                    'timeT': 'string',
                    'timestampT': 'string',
                    'timeuuidT': 'string',
                    'tinyintT': 'string',
                    'tupleT': [
                        {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        },
                    ],
                    'uuidT': 'string',
                    'varcharT': 'string',
                    'varintT': 'string',
                    'udtT': {
                        'string': {
                            'value': {'... recursive ...'},
                            'metadata': {
                                'expirationTime': 'string',
                                'writeTime': 'string'
                            }
                        }
                    }
                }
            },
            'newImage': {
                'valueCells': {
                    'string': {
                        'value': {
                            'asciiT': 'string',
                            'bigintT': 'string',
                            'blobT': b'bytes',
                            'boolT': True|False,
                            'counterT': 'string',
                            'dateT': 'string',
                            'decimalT': 'string',
                            'doubleT': 'string',
                            'floatT': 'string',
                            'inetT': 'string',
                            'intT': 'string',
                            'listT': [
                                {'... recursive ...'},
                            ],
                            'mapT': [
                                {
                                    'key': {'... recursive ...'},
                                    'value': {'... recursive ...'},
                                    'metadata': {
                                        'expirationTime': 'string',
                                        'writeTime': 'string'
                                    }
                                },
                            ],
                            'setT': [
                                {'... recursive ...'},
                            ],
                            'smallintT': 'string',
                            'textT': 'string',
                            'timeT': 'string',
                            'timestampT': 'string',
                            'timeuuidT': 'string',
                            'tinyintT': 'string',
                            'tupleT': [
                                {'... recursive ...'},
                            ],
                            'uuidT': 'string',
                            'varcharT': 'string',
                            'varintT': 'string',
                            'udtT': {
                                'string': {'... recursive ...'}
                            }
                        },
                        'metadata': {
                            'expirationTime': 'string',
                            'writeTime': 'string'
                        }
                    }
                },
                'staticCells': {
                    'string': {
                        'value': {
                            'asciiT': 'string',
                            'bigintT': 'string',
                            'blobT': b'bytes',
                            'boolT': True|False,
                            'counterT': 'string',
                            'dateT': 'string',
                            'decimalT': 'string',
                            'doubleT': 'string',
                            'floatT': 'string',
                            'inetT': 'string',
                            'intT': 'string',
                            'listT': [
                                {'... recursive ...'},
                            ],
                            'mapT': [
                                {
                                    'key': {'... recursive ...'},
                                    'value': {'... recursive ...'},
                                    'metadata': {
                                        'expirationTime': 'string',
                                        'writeTime': 'string'
                                    }
                                },
                            ],
                            'setT': [
                                {'... recursive ...'},
                            ],
                            'smallintT': 'string',
                            'textT': 'string',
                            'timeT': 'string',
                            'timestampT': 'string',
                            'timeuuidT': 'string',
                            'tinyintT': 'string',
                            'tupleT': [
                                {'... recursive ...'},
                            ],
                            'uuidT': 'string',
                            'varcharT': 'string',
                            'varintT': 'string',
                            'udtT': {
                                'string': {'... recursive ...'}
                            }
                        },
                        'metadata': {
                            'expirationTime': 'string',
                            'writeTime': 'string'
                        }
                    }
                },
                'rowMetadata': {
                    'expirationTime': 'string',
                    'writeTime': 'string'
                }
            },
            'oldImage': {
                'valueCells': {
                    'string': {
                        'value': {
                            'asciiT': 'string',
                            'bigintT': 'string',
                            'blobT': b'bytes',
                            'boolT': True|False,
                            'counterT': 'string',
                            'dateT': 'string',
                            'decimalT': 'string',
                            'doubleT': 'string',
                            'floatT': 'string',
                            'inetT': 'string',
                            'intT': 'string',
                            'listT': [
                                {'... recursive ...'},
                            ],
                            'mapT': [
                                {
                                    'key': {'... recursive ...'},
                                    'value': {'... recursive ...'},
                                    'metadata': {
                                        'expirationTime': 'string',
                                        'writeTime': 'string'
                                    }
                                },
                            ],
                            'setT': [
                                {'... recursive ...'},
                            ],
                            'smallintT': 'string',
                            'textT': 'string',
                            'timeT': 'string',
                            'timestampT': 'string',
                            'timeuuidT': 'string',
                            'tinyintT': 'string',
                            'tupleT': [
                                {'... recursive ...'},
                            ],
                            'uuidT': 'string',
                            'varcharT': 'string',
                            'varintT': 'string',
                            'udtT': {
                                'string': {'... recursive ...'}
                            }
                        },
                        'metadata': {
                            'expirationTime': 'string',
                            'writeTime': 'string'
                        }
                    }
                },
                'staticCells': {
                    'string': {
                        'value': {
                            'asciiT': 'string',
                            'bigintT': 'string',
                            'blobT': b'bytes',
                            'boolT': True|False,
                            'counterT': 'string',
                            'dateT': 'string',
                            'decimalT': 'string',
                            'doubleT': 'string',
                            'floatT': 'string',
                            'inetT': 'string',
                            'intT': 'string',
                            'listT': [
                                {'... recursive ...'},
                            ],
                            'mapT': [
                                {
                                    'key': {'... recursive ...'},
                                    'value': {'... recursive ...'},
                                    'metadata': {
                                        'expirationTime': 'string',
                                        'writeTime': 'string'
                                    }
                                },
                            ],
                            'setT': [
                                {'... recursive ...'},
                            ],
                            'smallintT': 'string',
                            'textT': 'string',
                            'timeT': 'string',
                            'timestampT': 'string',
                            'timeuuidT': 'string',
                            'tinyintT': 'string',
                            'tupleT': [
                                {'... recursive ...'},
                            ],
                            'uuidT': 'string',
                            'varcharT': 'string',
                            'varintT': 'string',
                            'udtT': {
                                'string': {'... recursive ...'}
                            }
                        },
                        'metadata': {
                            'expirationTime': 'string',
                            'writeTime': 'string'
                        }
                    }
                },
                'rowMetadata': {
                    'expirationTime': 'string',
                    'writeTime': 'string'
                }
            },
            'sequenceNumber': 'string'
        },
    ],
    'nextShardIterator': 'string'
}

Response Structure

  • (dict) --

    • changeRecords (list) --

      An array of change data records retrieved from the specified shard. Each record represents a single data modification (insert, update, or delete) to a row in the Amazon Keyspaces table. Records include the primary key columns and information about what data was modified.

      • (dict) --

        Represents a change data capture record for a row in an Amazon Keyspaces table, containing both the new and old states of the row.

        • eventVersion (string) --

          The version of the record format, used to track the evolution of the record structure over time.

        • createdAt (datetime) --

          The timestamp indicating when this change data capture record was created.

        • origin (string) --

          The origin or source of this change data capture record.

        • partitionKeys (dict) --

          The partition key columns and their values for the affected row.

          • (string) --

            • (dict) --

              Represents the value of a cell in an Amazon Keyspaces table, supporting various data types with type-specific fields.

              • asciiT (string) --

                A value of ASCII text type, containing US-ASCII characters.

              • bigintT (string) --

                A 64-bit signed integer value.

              • blobT (bytes) --

                A binary large object (BLOB) value stored as a Base64-encoded string.

              • boolT (boolean) --

                A Boolean value, either true or false.

              • counterT (string) --

                A distributed counter value that can be incremented and decremented.

              • dateT (string) --

                A date value without a time component, represented as days since epoch (January 1, 1970).

              • decimalT (string) --

                A variable-precision decimal number value.

              • doubleT (string) --

                A 64-bit double-precision floating point value.

              • floatT (string) --

                A 32-bit single-precision floating point value.

              • inetT (string) --

                An IP address value, either IPv4 or IPv6 format.

              • intT (string) --

                A 32-bit signed integer value.

              • listT (list) --

                An ordered collection of elements that can contain duplicate values.

                • (dict) --

                  Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • value (dict) --

                    The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • metadata (dict) --

                    Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • mapT (list) --

                A collection of key-value pairs where each key is unique.

                • (dict) --

                  Represents a key-value pair within a map data type in Amazon Keyspaces, including the associated metadata.

                  • key (dict) --

                    The key of this map entry in the Amazon Keyspaces cell.

                  • value (dict) --

                    The value associated with the key in this map entry.

                  • metadata (dict) --

                    Metadata for this specific key-value pair within the map, such as timestamps and TTL information.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • setT (list) --

                An unordered collection of unique elements.

                • (dict) --

                  Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • value (dict) --

                    The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • metadata (dict) --

                    Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • smallintT (string) --

                A 16-bit signed integer value.

              • textT (string) --

                A UTF-8 encoded string value.

              • timeT (string) --

                A time value without a date component, with nanosecond precision.

              • timestampT (string) --

                A timestamp value representing date and time with millisecond precision.

              • timeuuidT (string) --

                A universally unique identifier (UUID) that includes a timestamp component, ensuring both uniqueness and time ordering.

              • tinyintT (string) --

                An 8-bit signed integer value.

              • tupleT (list) --

                A fixed-length ordered list of elements, where each element can be of a different data type.

                • (dict) --

                  Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • value (dict) --

                    The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • metadata (dict) --

                    Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • uuidT (string) --

                A universally unique identifier (UUID) value.

              • varcharT (string) --

                A UTF-8 encoded string value, functionally equivalent to text type.

              • varintT (string) --

                A variable precision integer value with arbitrary length.

              • udtT (dict) --

                A user-defined type (UDT) value consisting of named fields, each with its own data type.

                • (string) --

                  • (dict) --

                    Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                    • value (dict) --

                      The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                    • metadata (dict) --

                      Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                      • expirationTime (string) --

                        The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                      • writeTime (string) --

                        The timestamp at which the associated data was written to the database.

        • clusteringKeys (dict) --

          The clustering key columns and their values for the affected row, which determine the order of rows within a partition.

          • (string) --

            • (dict) --

              Represents the value of a cell in an Amazon Keyspaces table, supporting various data types with type-specific fields.

              • asciiT (string) --

                A value of ASCII text type, containing US-ASCII characters.

              • bigintT (string) --

                A 64-bit signed integer value.

              • blobT (bytes) --

                A binary large object (BLOB) value stored as a Base64-encoded string.

              • boolT (boolean) --

                A Boolean value, either true or false.

              • counterT (string) --

                A distributed counter value that can be incremented and decremented.

              • dateT (string) --

                A date value without a time component, represented as days since epoch (January 1, 1970).

              • decimalT (string) --

                A variable-precision decimal number value.

              • doubleT (string) --

                A 64-bit double-precision floating point value.

              • floatT (string) --

                A 32-bit single-precision floating point value.

              • inetT (string) --

                An IP address value, either IPv4 or IPv6 format.

              • intT (string) --

                A 32-bit signed integer value.

              • listT (list) --

                An ordered collection of elements that can contain duplicate values.

                • (dict) --

                  Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • value (dict) --

                    The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • metadata (dict) --

                    Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • mapT (list) --

                A collection of key-value pairs where each key is unique.

                • (dict) --

                  Represents a key-value pair within a map data type in Amazon Keyspaces, including the associated metadata.

                  • key (dict) --

                    The key of this map entry in the Amazon Keyspaces cell.

                  • value (dict) --

                    The value associated with the key in this map entry.

                  • metadata (dict) --

                    Metadata for this specific key-value pair within the map, such as timestamps and TTL information.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • setT (list) --

                An unordered collection of unique elements.

                • (dict) --

                  Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • value (dict) --

                    The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • metadata (dict) --

                    Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • smallintT (string) --

                A 16-bit signed integer value.

              • textT (string) --

                A UTF-8 encoded string value.

              • timeT (string) --

                A time value without a date component, with nanosecond precision.

              • timestampT (string) --

                A timestamp value representing date and time with millisecond precision.

              • timeuuidT (string) --

                A universally unique identifier (UUID) that includes a timestamp component, ensuring both uniqueness and time ordering.

              • tinyintT (string) --

                An 8-bit signed integer value.

              • tupleT (list) --

                A fixed-length ordered list of elements, where each element can be of a different data type.

                • (dict) --

                  Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • value (dict) --

                    The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • metadata (dict) --

                    Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                    • expirationTime (string) --

                      The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                    • writeTime (string) --

                      The timestamp at which the associated data was written to the database.

              • uuidT (string) --

                A universally unique identifier (UUID) value.

              • varcharT (string) --

                A UTF-8 encoded string value, functionally equivalent to text type.

              • varintT (string) --

                A variable precision integer value with arbitrary length.

              • udtT (dict) --

                A user-defined type (UDT) value consisting of named fields, each with its own data type.

                • (string) --

                  • (dict) --

                    Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                    • value (dict) --

                      The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                    • metadata (dict) --

                      Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                      • expirationTime (string) --

                        The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                      • writeTime (string) --

                        The timestamp at which the associated data was written to the database.

        • newImage (dict) --

          The state of the row after the change operation that generated this record.

          • valueCells (dict) --

            A map of regular (non-static) column cells in the row, where keys are column names and values are the corresponding cells.

            • (string) --

              • (dict) --

                Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • value (dict) --

                  The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • asciiT (string) --

                    A value of ASCII text type, containing US-ASCII characters.

                  • bigintT (string) --

                    A 64-bit signed integer value.

                  • blobT (bytes) --

                    A binary large object (BLOB) value stored as a Base64-encoded string.

                  • boolT (boolean) --

                    A Boolean value, either true or false.

                  • counterT (string) --

                    A distributed counter value that can be incremented and decremented.

                  • dateT (string) --

                    A date value without a time component, represented as days since epoch (January 1, 1970).

                  • decimalT (string) --

                    A variable-precision decimal number value.

                  • doubleT (string) --

                    A 64-bit double-precision floating point value.

                  • floatT (string) --

                    A 32-bit single-precision floating point value.

                  • inetT (string) --

                    An IP address value, either IPv4 or IPv6 format.

                  • intT (string) --

                    A 32-bit signed integer value.

                  • listT (list) --

                    An ordered collection of elements that can contain duplicate values.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • mapT (list) --

                    A collection of key-value pairs where each key is unique.

                    • (dict) --

                      Represents a key-value pair within a map data type in Amazon Keyspaces, including the associated metadata.

                      • key (dict) --

                        The key of this map entry in the Amazon Keyspaces cell.

                      • value (dict) --

                        The value associated with the key in this map entry.

                      • metadata (dict) --

                        Metadata for this specific key-value pair within the map, such as timestamps and TTL information.

                        • expirationTime (string) --

                          The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                        • writeTime (string) --

                          The timestamp at which the associated data was written to the database.

                  • setT (list) --

                    An unordered collection of unique elements.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • smallintT (string) --

                    A 16-bit signed integer value.

                  • textT (string) --

                    A UTF-8 encoded string value.

                  • timeT (string) --

                    A time value without a date component, with nanosecond precision.

                  • timestampT (string) --

                    A timestamp value representing date and time with millisecond precision.

                  • timeuuidT (string) --

                    A universally unique identifier (UUID) that includes a timestamp component, ensuring both uniqueness and time ordering.

                  • tinyintT (string) --

                    An 8-bit signed integer value.

                  • tupleT (list) --

                    A fixed-length ordered list of elements, where each element can be of a different data type.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • uuidT (string) --

                    A universally unique identifier (UUID) value.

                  • varcharT (string) --

                    A UTF-8 encoded string value, functionally equivalent to text type.

                  • varintT (string) --

                    A variable precision integer value with arbitrary length.

                  • udtT (dict) --

                    A user-defined type (UDT) value consisting of named fields, each with its own data type.

                    • (string) --

                      • (dict) --

                        Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • metadata (dict) --

                  Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                  • expirationTime (string) --

                    The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                  • writeTime (string) --

                    The timestamp at which the associated data was written to the database.

          • staticCells (dict) --

            A map of static column cells shared by all rows with the same partition key, where keys are column names and values are the corresponding cells.

            • (string) --

              • (dict) --

                Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • value (dict) --

                  The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • asciiT (string) --

                    A value of ASCII text type, containing US-ASCII characters.

                  • bigintT (string) --

                    A 64-bit signed integer value.

                  • blobT (bytes) --

                    A binary large object (BLOB) value stored as a Base64-encoded string.

                  • boolT (boolean) --

                    A Boolean value, either true or false.

                  • counterT (string) --

                    A distributed counter value that can be incremented and decremented.

                  • dateT (string) --

                    A date value without a time component, represented as days since epoch (January 1, 1970).

                  • decimalT (string) --

                    A variable-precision decimal number value.

                  • doubleT (string) --

                    A 64-bit double-precision floating point value.

                  • floatT (string) --

                    A 32-bit single-precision floating point value.

                  • inetT (string) --

                    An IP address value, either IPv4 or IPv6 format.

                  • intT (string) --

                    A 32-bit signed integer value.

                  • listT (list) --

                    An ordered collection of elements that can contain duplicate values.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • mapT (list) --

                    A collection of key-value pairs where each key is unique.

                    • (dict) --

                      Represents a key-value pair within a map data type in Amazon Keyspaces, including the associated metadata.

                      • key (dict) --

                        The key of this map entry in the Amazon Keyspaces cell.

                      • value (dict) --

                        The value associated with the key in this map entry.

                      • metadata (dict) --

                        Metadata for this specific key-value pair within the map, such as timestamps and TTL information.

                        • expirationTime (string) --

                          The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                        • writeTime (string) --

                          The timestamp at which the associated data was written to the database.

                  • setT (list) --

                    An unordered collection of unique elements.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • smallintT (string) --

                    A 16-bit signed integer value.

                  • textT (string) --

                    A UTF-8 encoded string value.

                  • timeT (string) --

                    A time value without a date component, with nanosecond precision.

                  • timestampT (string) --

                    A timestamp value representing date and time with millisecond precision.

                  • timeuuidT (string) --

                    A universally unique identifier (UUID) that includes a timestamp component, ensuring both uniqueness and time ordering.

                  • tinyintT (string) --

                    An 8-bit signed integer value.

                  • tupleT (list) --

                    A fixed-length ordered list of elements, where each element can be of a different data type.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • uuidT (string) --

                    A universally unique identifier (UUID) value.

                  • varcharT (string) --

                    A UTF-8 encoded string value, functionally equivalent to text type.

                  • varintT (string) --

                    A variable precision integer value with arbitrary length.

                  • udtT (dict) --

                    A user-defined type (UDT) value consisting of named fields, each with its own data type.

                    • (string) --

                      • (dict) --

                        Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • metadata (dict) --

                  Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                  • expirationTime (string) --

                    The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                  • writeTime (string) --

                    The timestamp at which the associated data was written to the database.

          • rowMetadata (dict) --

            Metadata that applies to the entire row, such as timestamps and TTL information.

            • expirationTime (string) --

              The time at which the associated data will expire, based on the time-to-live (TTL) setting.

            • writeTime (string) --

              The timestamp at which the associated data was written to the database.

        • oldImage (dict) --

          The state of the row before the change operation that generated this record.

          • valueCells (dict) --

            A map of regular (non-static) column cells in the row, where keys are column names and values are the corresponding cells.

            • (string) --

              • (dict) --

                Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • value (dict) --

                  The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • asciiT (string) --

                    A value of ASCII text type, containing US-ASCII characters.

                  • bigintT (string) --

                    A 64-bit signed integer value.

                  • blobT (bytes) --

                    A binary large object (BLOB) value stored as a Base64-encoded string.

                  • boolT (boolean) --

                    A Boolean value, either true or false.

                  • counterT (string) --

                    A distributed counter value that can be incremented and decremented.

                  • dateT (string) --

                    A date value without a time component, represented as days since epoch (January 1, 1970).

                  • decimalT (string) --

                    A variable-precision decimal number value.

                  • doubleT (string) --

                    A 64-bit double-precision floating point value.

                  • floatT (string) --

                    A 32-bit single-precision floating point value.

                  • inetT (string) --

                    An IP address value, either IPv4 or IPv6 format.

                  • intT (string) --

                    A 32-bit signed integer value.

                  • listT (list) --

                    An ordered collection of elements that can contain duplicate values.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • mapT (list) --

                    A collection of key-value pairs where each key is unique.

                    • (dict) --

                      Represents a key-value pair within a map data type in Amazon Keyspaces, including the associated metadata.

                      • key (dict) --

                        The key of this map entry in the Amazon Keyspaces cell.

                      • value (dict) --

                        The value associated with the key in this map entry.

                      • metadata (dict) --

                        Metadata for this specific key-value pair within the map, such as timestamps and TTL information.

                        • expirationTime (string) --

                          The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                        • writeTime (string) --

                          The timestamp at which the associated data was written to the database.

                  • setT (list) --

                    An unordered collection of unique elements.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • smallintT (string) --

                    A 16-bit signed integer value.

                  • textT (string) --

                    A UTF-8 encoded string value.

                  • timeT (string) --

                    A time value without a date component, with nanosecond precision.

                  • timestampT (string) --

                    A timestamp value representing date and time with millisecond precision.

                  • timeuuidT (string) --

                    A universally unique identifier (UUID) that includes a timestamp component, ensuring both uniqueness and time ordering.

                  • tinyintT (string) --

                    An 8-bit signed integer value.

                  • tupleT (list) --

                    A fixed-length ordered list of elements, where each element can be of a different data type.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • uuidT (string) --

                    A universally unique identifier (UUID) value.

                  • varcharT (string) --

                    A UTF-8 encoded string value, functionally equivalent to text type.

                  • varintT (string) --

                    A variable precision integer value with arbitrary length.

                  • udtT (dict) --

                    A user-defined type (UDT) value consisting of named fields, each with its own data type.

                    • (string) --

                      • (dict) --

                        Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • metadata (dict) --

                  Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                  • expirationTime (string) --

                    The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                  • writeTime (string) --

                    The timestamp at which the associated data was written to the database.

          • staticCells (dict) --

            A map of static column cells shared by all rows with the same partition key, where keys are column names and values are the corresponding cells.

            • (string) --

              • (dict) --

                Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • value (dict) --

                  The value stored in this cell, which can be of various data types supported by Amazon Keyspaces.

                  • asciiT (string) --

                    A value of ASCII text type, containing US-ASCII characters.

                  • bigintT (string) --

                    A 64-bit signed integer value.

                  • blobT (bytes) --

                    A binary large object (BLOB) value stored as a Base64-encoded string.

                  • boolT (boolean) --

                    A Boolean value, either true or false.

                  • counterT (string) --

                    A distributed counter value that can be incremented and decremented.

                  • dateT (string) --

                    A date value without a time component, represented as days since epoch (January 1, 1970).

                  • decimalT (string) --

                    A variable-precision decimal number value.

                  • doubleT (string) --

                    A 64-bit double-precision floating point value.

                  • floatT (string) --

                    A 32-bit single-precision floating point value.

                  • inetT (string) --

                    An IP address value, either IPv4 or IPv6 format.

                  • intT (string) --

                    A 32-bit signed integer value.

                  • listT (list) --

                    An ordered collection of elements that can contain duplicate values.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • mapT (list) --

                    A collection of key-value pairs where each key is unique.

                    • (dict) --

                      Represents a key-value pair within a map data type in Amazon Keyspaces, including the associated metadata.

                      • key (dict) --

                        The key of this map entry in the Amazon Keyspaces cell.

                      • value (dict) --

                        The value associated with the key in this map entry.

                      • metadata (dict) --

                        Metadata for this specific key-value pair within the map, such as timestamps and TTL information.

                        • expirationTime (string) --

                          The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                        • writeTime (string) --

                          The timestamp at which the associated data was written to the database.

                  • setT (list) --

                    An unordered collection of unique elements.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • smallintT (string) --

                    A 16-bit signed integer value.

                  • textT (string) --

                    A UTF-8 encoded string value.

                  • timeT (string) --

                    A time value without a date component, with nanosecond precision.

                  • timestampT (string) --

                    A timestamp value representing date and time with millisecond precision.

                  • timeuuidT (string) --

                    A universally unique identifier (UUID) that includes a timestamp component, ensuring both uniqueness and time ordering.

                  • tinyintT (string) --

                    An 8-bit signed integer value.

                  • tupleT (list) --

                    A fixed-length ordered list of elements, where each element can be of a different data type.

                    • (dict) --

                      Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                  • uuidT (string) --

                    A universally unique identifier (UUID) value.

                  • varcharT (string) --

                    A UTF-8 encoded string value, functionally equivalent to text type.

                  • varintT (string) --

                    A variable precision integer value with arbitrary length.

                  • udtT (dict) --

                    A user-defined type (UDT) value consisting of named fields, each with its own data type.

                    • (string) --

                      • (dict) --

                        Represents a cell in an Amazon Keyspaces table, containing both the value and metadata about the cell.

                • metadata (dict) --

                  Metadata associated with this cell, such as time-to-live (TTL) expiration time and write timestamp.

                  • expirationTime (string) --

                    The time at which the associated data will expire, based on the time-to-live (TTL) setting.

                  • writeTime (string) --

                    The timestamp at which the associated data was written to the database.

          • rowMetadata (dict) --

            Metadata that applies to the entire row, such as timestamps and TTL information.

            • expirationTime (string) --

              The time at which the associated data will expire, based on the time-to-live (TTL) setting.

            • writeTime (string) --

              The timestamp at which the associated data was written to the database.

        • sequenceNumber (string) --

          A unique identifier assigned to this record within the shard, used for ordering and tracking purposes.

    • nextShardIterator (string) --

      The next position in the shard from which to start sequentially reading data records. If null, the shard has been closed and the requested iterator doesn't return any more data.

GetShardIterator (new) Link ¶

Returns a shard iterator that serves as a bookmark for reading data from a specific position in an Amazon Keyspaces data stream's shard. The shard iterator specifies the shard position from which to start reading data records sequentially. You can specify whether to begin reading at the latest record, the oldest record, or at a particular sequence number within the shard.

See also: AWS API Documentation

Request Syntax

client.get_shard_iterator(
    streamArn='string',
    shardId='string',
    shardIteratorType='TRIM_HORIZON'|'LATEST'|'AT_SEQUENCE_NUMBER'|'AFTER_SEQUENCE_NUMBER',
    sequenceNumber='string'
)
type streamArn:

string

param streamArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the stream for which to get the shard iterator. The ARN uniquely identifies the stream within Amazon Keyspaces.

type shardId:

string

param shardId:

[REQUIRED]

The identifier of the shard within the stream. The shard ID uniquely identifies a subset of the stream's data records that you want to access.

type shardIteratorType:

string

param shardIteratorType:

[REQUIRED]

Determines how the shard iterator is positioned. Must be one of the following:

  • TRIM_HORIZON - Start reading at the last untrimmed record in the shard, which is the oldest data record in the shard.

  • AT_SEQUENCE_NUMBER - Start reading exactly from the specified sequence number.

  • AFTER_SEQUENCE_NUMBER - Start reading right after the specified sequence number.

  • LATEST - Start reading just after the most recent record in the shard, so that you always read the most recent data.

type sequenceNumber:

string

param sequenceNumber:

The sequence number of the data record in the shard from which to start reading. Required if ShardIteratorType is AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. This parameter is ignored for other iterator types.

rtype:

dict

returns:

Response Syntax

{
    'shardIterator': 'string'
}

Response Structure

  • (dict) --

    • shardIterator (string) --

      The unique identifier for the shard iterator. This value is used in the GetRecords operation to retrieve data records from the specified shard. Each shard iterator expires 5 minutes after it is returned to the requester.