Skip to content

Typed dictionaries

Index > DynamoDBStreams > Typed dictionaries

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

AttributeValueTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import AttributeValueTypeDef

def get_value() -> AttributeValueTypeDef:
    return {
        "S": ...,
    }
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

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import DescribeStreamInputRequestTypeDef

def get_value() -> DescribeStreamInputRequestTypeDef:
    return {
        "StreamArn": ...,
    }
Definition
class DescribeStreamInputRequestTypeDef(TypedDict):
    StreamArn: str,
    Limit: NotRequired[int],
    ExclusiveStartShardId: NotRequired[str],

ResponseMetadataTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import ResponseMetadataTypeDef

def get_value() -> ResponseMetadataTypeDef:
    return {
        "RequestId": ...,
        "HostId": ...,
        "HTTPStatusCode": ...,
        "HTTPHeaders": ...,
        "RetryAttempts": ...,
    }
Definition
class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HostId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,

GetRecordsInputRequestTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import GetRecordsInputRequestTypeDef

def get_value() -> GetRecordsInputRequestTypeDef:
    return {
        "ShardIterator": ...,
    }
Definition
class GetRecordsInputRequestTypeDef(TypedDict):
    ShardIterator: str,
    Limit: NotRequired[int],

GetShardIteratorInputRequestTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import GetShardIteratorInputRequestTypeDef

def get_value() -> GetShardIteratorInputRequestTypeDef:
    return {
        "StreamArn": ...,
        "ShardId": ...,
        "ShardIteratorType": ...,
    }
Definition
class GetShardIteratorInputRequestTypeDef(TypedDict):
    StreamArn: str,
    ShardId: str,
    ShardIteratorType: ShardIteratorTypeType,  # (1)
    SequenceNumber: NotRequired[str],
  1. See ShardIteratorTypeType

IdentityTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import IdentityTypeDef

def get_value() -> IdentityTypeDef:
    return {
        "PrincipalId": ...,
    }
Definition
class IdentityTypeDef(TypedDict):
    PrincipalId: NotRequired[str],
    Type: NotRequired[str],

KeySchemaElementTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import KeySchemaElementTypeDef

def get_value() -> KeySchemaElementTypeDef:
    return {
        "AttributeName": ...,
        "KeyType": ...,
    }
Definition
class KeySchemaElementTypeDef(TypedDict):
    AttributeName: str,
    KeyType: KeyTypeType,  # (1)
  1. See KeyTypeType

ListStreamsInputRequestTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import ListStreamsInputRequestTypeDef

def get_value() -> ListStreamsInputRequestTypeDef:
    return {
        "TableName": ...,
    }
Definition
class ListStreamsInputRequestTypeDef(TypedDict):
    TableName: NotRequired[str],
    Limit: NotRequired[int],
    ExclusiveStartStreamArn: NotRequired[str],

StreamTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import StreamTypeDef

def get_value() -> StreamTypeDef:
    return {
        "StreamArn": ...,
    }
Definition
class StreamTypeDef(TypedDict):
    StreamArn: NotRequired[str],
    TableName: NotRequired[str],
    StreamLabel: NotRequired[str],

StreamRecordTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import StreamRecordTypeDef

def get_value() -> StreamRecordTypeDef:
    return {
        "ApproximateCreationDateTime": ...,
    }
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

SequenceNumberRangeTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import SequenceNumberRangeTypeDef

def get_value() -> SequenceNumberRangeTypeDef:
    return {
        "StartingSequenceNumber": ...,
    }
Definition
class SequenceNumberRangeTypeDef(TypedDict):
    StartingSequenceNumber: NotRequired[str],
    EndingSequenceNumber: NotRequired[str],

GetShardIteratorOutputTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import GetShardIteratorOutputTypeDef

def get_value() -> GetShardIteratorOutputTypeDef:
    return {
        "ShardIterator": ...,
        "ResponseMetadata": ...,
    }
Definition
class GetShardIteratorOutputTypeDef(TypedDict):
    ShardIterator: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ListStreamsOutputTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import ListStreamsOutputTypeDef

def get_value() -> ListStreamsOutputTypeDef:
    return {
        "Streams": ...,
        "LastEvaluatedStreamArn": ...,
        "ResponseMetadata": ...,
    }
Definition
class ListStreamsOutputTypeDef(TypedDict):
    Streams: List[StreamTypeDef],  # (1)
    LastEvaluatedStreamArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See StreamTypeDef
  2. See ResponseMetadataTypeDef

RecordTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import RecordTypeDef

def get_value() -> RecordTypeDef:
    return {
        "eventID": ...,
    }
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

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import ShardTypeDef

def get_value() -> ShardTypeDef:
    return {
        "ShardId": ...,
    }
Definition
class ShardTypeDef(TypedDict):
    ShardId: NotRequired[str],
    SequenceNumberRange: NotRequired[SequenceNumberRangeTypeDef],  # (1)
    ParentShardId: NotRequired[str],
  1. See SequenceNumberRangeTypeDef

GetRecordsOutputTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import GetRecordsOutputTypeDef

def get_value() -> GetRecordsOutputTypeDef:
    return {
        "Records": ...,
        "NextShardIterator": ...,
        "ResponseMetadata": ...,
    }
Definition
class GetRecordsOutputTypeDef(TypedDict):
    Records: List[RecordTypeDef],  # (1)
    NextShardIterator: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See RecordTypeDef
  2. See ResponseMetadataTypeDef

StreamDescriptionTypeDef

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import StreamDescriptionTypeDef

def get_value() -> StreamDescriptionTypeDef:
    return {
        "StreamArn": ...,
    }
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

Usage Example
from mypy_boto3_dynamodbstreams.type_defs import DescribeStreamOutputTypeDef

def get_value() -> DescribeStreamOutputTypeDef:
    return {
        "StreamDescription": ...,
        "ResponseMetadata": ...,
    }
Definition
class DescribeStreamOutputTypeDef(TypedDict):
    StreamDescription: StreamDescriptionTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See StreamDescriptionTypeDef
  2. See ResponseMetadataTypeDef