Skip to content

Typed dictionaries#

Index > DynamoDBStreams > Typed dictionaries

Auto-generated documentation for DynamoDBStreams type annotations stubs module mypy-boto3-dynamodbstreams.

AttributeValueTypeDef#

# AttributeValueTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import AttributeValueTypeDef

def get_value() -> AttributeValueTypeDef:
    return {
        "S": ...,
    }
# AttributeValueTypeDef definition

class AttributeValueTypeDef(TypedDict):
    S: NotRequired[str],
    N: NotRequired[str],
    B: NotRequired[bytes],
    SS: NotRequired[List[str]],
    NS: NotRequired[List[str]],
    BS: NotRequired[List[bytes]],
    M: NotRequired[Dict[str, AttributeValueTypeDef]],  # (1)
    L: NotRequired[List[AttributeValueTypeDef]],  # (2)
    NULL: NotRequired[bool],
    BOOL: NotRequired[bool],
  1. See AttributeValueTypeDef
  2. See AttributeValueTypeDef

DescribeStreamInputRequestTypeDef#

# DescribeStreamInputRequestTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import DescribeStreamInputRequestTypeDef

def get_value() -> DescribeStreamInputRequestTypeDef:
    return {
        "StreamArn": ...,
    }
# DescribeStreamInputRequestTypeDef definition

class DescribeStreamInputRequestTypeDef(TypedDict):
    StreamArn: str,
    Limit: NotRequired[int],
    ExclusiveStartShardId: NotRequired[str],

GetRecordsInputRequestTypeDef#

# GetRecordsInputRequestTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import GetRecordsInputRequestTypeDef

def get_value() -> GetRecordsInputRequestTypeDef:
    return {
        "ShardIterator": ...,
    }
# GetRecordsInputRequestTypeDef definition

class GetRecordsInputRequestTypeDef(TypedDict):
    ShardIterator: str,
    Limit: NotRequired[int],

GetShardIteratorInputRequestTypeDef#

# GetShardIteratorInputRequestTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import GetShardIteratorInputRequestTypeDef

def get_value() -> GetShardIteratorInputRequestTypeDef:
    return {
        "StreamArn": ...,
        "ShardId": ...,
        "ShardIteratorType": ...,
    }
# GetShardIteratorInputRequestTypeDef definition

class GetShardIteratorInputRequestTypeDef(TypedDict):
    StreamArn: str,
    ShardId: str,
    ShardIteratorType: ShardIteratorTypeType,  # (1)
    SequenceNumber: NotRequired[str],
  1. See ShardIteratorTypeType

GetShardIteratorOutputTypeDef#

# GetShardIteratorOutputTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import GetShardIteratorOutputTypeDef

def get_value() -> GetShardIteratorOutputTypeDef:
    return {
        "ShardIterator": ...,
        "ResponseMetadata": ...,
    }
# GetShardIteratorOutputTypeDef definition

class GetShardIteratorOutputTypeDef(TypedDict):
    ShardIterator: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

IdentityTypeDef#

# IdentityTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import IdentityTypeDef

def get_value() -> IdentityTypeDef:
    return {
        "PrincipalId": ...,
    }
# IdentityTypeDef definition

class IdentityTypeDef(TypedDict):
    PrincipalId: NotRequired[str],
    Type: NotRequired[str],

KeySchemaElementTypeDef#

# KeySchemaElementTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import KeySchemaElementTypeDef

def get_value() -> KeySchemaElementTypeDef:
    return {
        "AttributeName": ...,
        "KeyType": ...,
    }
# KeySchemaElementTypeDef definition

class KeySchemaElementTypeDef(TypedDict):
    AttributeName: str,
    KeyType: KeyTypeType,  # (1)
  1. See KeyTypeType

ListStreamsInputRequestTypeDef#

# ListStreamsInputRequestTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import ListStreamsInputRequestTypeDef

def get_value() -> ListStreamsInputRequestTypeDef:
    return {
        "TableName": ...,
    }
# ListStreamsInputRequestTypeDef definition

class ListStreamsInputRequestTypeDef(TypedDict):
    TableName: NotRequired[str],
    Limit: NotRequired[int],
    ExclusiveStartStreamArn: NotRequired[str],

StreamTypeDef#

# StreamTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import StreamTypeDef

def get_value() -> StreamTypeDef:
    return {
        "StreamArn": ...,
    }
# StreamTypeDef definition

class StreamTypeDef(TypedDict):
    StreamArn: NotRequired[str],
    TableName: NotRequired[str],
    StreamLabel: NotRequired[str],

StreamRecordTypeDef#

# StreamRecordTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import StreamRecordTypeDef

def get_value() -> StreamRecordTypeDef:
    return {
        "ApproximateCreationDateTime": ...,
    }
# StreamRecordTypeDef definition

class StreamRecordTypeDef(TypedDict):
    ApproximateCreationDateTime: NotRequired[datetime],
    Keys: NotRequired[Dict[str, AttributeValueTypeDef]],  # (1)
    NewImage: NotRequired[Dict[str, AttributeValueTypeDef]],  # (1)
    OldImage: NotRequired[Dict[str, AttributeValueTypeDef]],  # (1)
    SequenceNumber: NotRequired[str],
    SizeBytes: NotRequired[int],
    StreamViewType: NotRequired[StreamViewTypeType],  # (4)
  1. See AttributeValueTypeDef
  2. See AttributeValueTypeDef
  3. See AttributeValueTypeDef
  4. See StreamViewTypeType

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import ResponseMetadataTypeDef

def get_value() -> ResponseMetadataTypeDef:
    return {
        "RequestId": ...,
        "HostId": ...,
        "HTTPStatusCode": ...,
        "HTTPHeaders": ...,
        "RetryAttempts": ...,
    }
# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HostId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,

SequenceNumberRangeTypeDef#

# SequenceNumberRangeTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import SequenceNumberRangeTypeDef

def get_value() -> SequenceNumberRangeTypeDef:
    return {
        "StartingSequenceNumber": ...,
    }
# SequenceNumberRangeTypeDef definition

class SequenceNumberRangeTypeDef(TypedDict):
    StartingSequenceNumber: NotRequired[str],
    EndingSequenceNumber: NotRequired[str],

ListStreamsOutputTypeDef#

# ListStreamsOutputTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import ListStreamsOutputTypeDef

def get_value() -> ListStreamsOutputTypeDef:
    return {
        "Streams": ...,
        "LastEvaluatedStreamArn": ...,
        "ResponseMetadata": ...,
    }
# ListStreamsOutputTypeDef definition

class ListStreamsOutputTypeDef(TypedDict):
    Streams: List[StreamTypeDef],  # (1)
    LastEvaluatedStreamArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See StreamTypeDef
  2. See ResponseMetadataTypeDef

RecordTypeDef#

# RecordTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import RecordTypeDef

def get_value() -> RecordTypeDef:
    return {
        "eventID": ...,
    }
# RecordTypeDef definition

class RecordTypeDef(TypedDict):
    eventID: NotRequired[str],
    eventName: NotRequired[OperationTypeType],  # (1)
    eventVersion: NotRequired[str],
    eventSource: NotRequired[str],
    awsRegion: NotRequired[str],
    dynamodb: NotRequired[StreamRecordTypeDef],  # (2)
    userIdentity: NotRequired[IdentityTypeDef],  # (3)
  1. See OperationTypeType
  2. See StreamRecordTypeDef
  3. See IdentityTypeDef

ShardTypeDef#

# ShardTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import ShardTypeDef

def get_value() -> ShardTypeDef:
    return {
        "ShardId": ...,
    }
# ShardTypeDef definition

class ShardTypeDef(TypedDict):
    ShardId: NotRequired[str],
    SequenceNumberRange: NotRequired[SequenceNumberRangeTypeDef],  # (1)
    ParentShardId: NotRequired[str],
  1. See SequenceNumberRangeTypeDef

GetRecordsOutputTypeDef#

# GetRecordsOutputTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import GetRecordsOutputTypeDef

def get_value() -> GetRecordsOutputTypeDef:
    return {
        "Records": ...,
        "NextShardIterator": ...,
        "ResponseMetadata": ...,
    }
# GetRecordsOutputTypeDef definition

class GetRecordsOutputTypeDef(TypedDict):
    Records: List[RecordTypeDef],  # (1)
    NextShardIterator: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See RecordTypeDef
  2. See ResponseMetadataTypeDef

StreamDescriptionTypeDef#

# StreamDescriptionTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import StreamDescriptionTypeDef

def get_value() -> StreamDescriptionTypeDef:
    return {
        "StreamArn": ...,
    }
# StreamDescriptionTypeDef definition

class StreamDescriptionTypeDef(TypedDict):
    StreamArn: NotRequired[str],
    StreamLabel: NotRequired[str],
    StreamStatus: NotRequired[StreamStatusType],  # (1)
    StreamViewType: NotRequired[StreamViewTypeType],  # (2)
    CreationRequestDateTime: NotRequired[datetime],
    TableName: NotRequired[str],
    KeySchema: NotRequired[List[KeySchemaElementTypeDef]],  # (3)
    Shards: NotRequired[List[ShardTypeDef]],  # (4)
    LastEvaluatedShardId: NotRequired[str],
  1. See StreamStatusType
  2. See StreamViewTypeType
  3. See KeySchemaElementTypeDef
  4. See ShardTypeDef

DescribeStreamOutputTypeDef#

# DescribeStreamOutputTypeDef usage example

from mypy_boto3_dynamodbstreams.type_defs import DescribeStreamOutputTypeDef

def get_value() -> DescribeStreamOutputTypeDef:
    return {
        "StreamDescription": ...,
        "ResponseMetadata": ...,
    }
# DescribeStreamOutputTypeDef definition

class DescribeStreamOutputTypeDef(TypedDict):
    StreamDescription: StreamDescriptionTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See StreamDescriptionTypeDef
  2. See ResponseMetadataTypeDef