Skip to content

Type definitions#

Index > Kinesis > Type definitions

Auto-generated documentation for Kinesis type annotations stubs module mypy-boto3-kinesis.

BlobTypeDef#

# BlobTypeDef definition

BlobTypeDef = Union[
    str,
    bytes,
    IO[Any],
    StreamingBody,
]

TimestampTypeDef#

# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime,
    str,
]

AddTagsToStreamInputRequestTypeDef#

# AddTagsToStreamInputRequestTypeDef definition

class AddTagsToStreamInputRequestTypeDef(TypedDict):
    Tags: Mapping[str, str],
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],

HashKeyRangeTypeDef#

# HashKeyRangeTypeDef definition

class HashKeyRangeTypeDef(TypedDict):
    StartingHashKey: str,
    EndingHashKey: str,

ConsumerDescriptionTypeDef#

# ConsumerDescriptionTypeDef definition

class ConsumerDescriptionTypeDef(TypedDict):
    ConsumerName: str,
    ConsumerARN: str,
    ConsumerStatus: ConsumerStatusType,  # (1)
    ConsumerCreationTimestamp: datetime,
    StreamARN: str,
  1. See ConsumerStatusType

ConsumerTypeDef#

# ConsumerTypeDef definition

class ConsumerTypeDef(TypedDict):
    ConsumerName: str,
    ConsumerARN: str,
    ConsumerStatus: ConsumerStatusType,  # (1)
    ConsumerCreationTimestamp: datetime,
  1. See ConsumerStatusType

StreamModeDetailsTypeDef#

# StreamModeDetailsTypeDef definition

class StreamModeDetailsTypeDef(TypedDict):
    StreamMode: StreamModeType,  # (1)
  1. See StreamModeType

DecreaseStreamRetentionPeriodInputRequestTypeDef#

# DecreaseStreamRetentionPeriodInputRequestTypeDef definition

class DecreaseStreamRetentionPeriodInputRequestTypeDef(TypedDict):
    RetentionPeriodHours: int,
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],

DeleteResourcePolicyInputRequestTypeDef#

# DeleteResourcePolicyInputRequestTypeDef definition

class DeleteResourcePolicyInputRequestTypeDef(TypedDict):
    ResourceARN: str,

DeleteStreamInputRequestTypeDef#

# DeleteStreamInputRequestTypeDef definition

class DeleteStreamInputRequestTypeDef(TypedDict):
    StreamName: NotRequired[str],
    EnforceConsumerDeletion: NotRequired[bool],
    StreamARN: NotRequired[str],

DeregisterStreamConsumerInputRequestTypeDef#

# DeregisterStreamConsumerInputRequestTypeDef definition

class DeregisterStreamConsumerInputRequestTypeDef(TypedDict):
    StreamARN: NotRequired[str],
    ConsumerName: NotRequired[str],
    ConsumerARN: NotRequired[str],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

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

DescribeStreamConsumerInputRequestTypeDef#

# DescribeStreamConsumerInputRequestTypeDef definition

class DescribeStreamConsumerInputRequestTypeDef(TypedDict):
    StreamARN: NotRequired[str],
    ConsumerName: NotRequired[str],
    ConsumerARN: NotRequired[str],

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

class PaginatorConfigTypeDef(TypedDict):
    MaxItems: NotRequired[int],
    PageSize: NotRequired[int],
    StartingToken: NotRequired[str],

DescribeStreamInputRequestTypeDef#

# DescribeStreamInputRequestTypeDef definition

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

WaiterConfigTypeDef#

# WaiterConfigTypeDef definition

class WaiterConfigTypeDef(TypedDict):
    Delay: NotRequired[int],
    MaxAttempts: NotRequired[int],

DescribeStreamSummaryInputRequestTypeDef#

# DescribeStreamSummaryInputRequestTypeDef definition

class DescribeStreamSummaryInputRequestTypeDef(TypedDict):
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],

DisableEnhancedMonitoringInputRequestTypeDef#

# DisableEnhancedMonitoringInputRequestTypeDef definition

class DisableEnhancedMonitoringInputRequestTypeDef(TypedDict):
    ShardLevelMetrics: Sequence[MetricsNameType],  # (1)
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],
  1. See MetricsNameType

EnableEnhancedMonitoringInputRequestTypeDef#

# EnableEnhancedMonitoringInputRequestTypeDef definition

class EnableEnhancedMonitoringInputRequestTypeDef(TypedDict):
    ShardLevelMetrics: Sequence[MetricsNameType],  # (1)
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],
  1. See MetricsNameType

EnhancedMetricsTypeDef#

# EnhancedMetricsTypeDef definition

class EnhancedMetricsTypeDef(TypedDict):
    ShardLevelMetrics: NotRequired[List[MetricsNameType]],  # (1)
  1. See MetricsNameType

GetRecordsInputRequestTypeDef#

# GetRecordsInputRequestTypeDef definition

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

RecordTypeDef#

# RecordTypeDef definition

class RecordTypeDef(TypedDict):
    SequenceNumber: str,
    Data: bytes,
    PartitionKey: str,
    ApproximateArrivalTimestamp: NotRequired[datetime],
    EncryptionType: NotRequired[EncryptionTypeType],  # (1)
  1. See EncryptionTypeType

GetResourcePolicyInputRequestTypeDef#

# GetResourcePolicyInputRequestTypeDef definition

class GetResourcePolicyInputRequestTypeDef(TypedDict):
    ResourceARN: str,

IncreaseStreamRetentionPeriodInputRequestTypeDef#

# IncreaseStreamRetentionPeriodInputRequestTypeDef definition

class IncreaseStreamRetentionPeriodInputRequestTypeDef(TypedDict):
    RetentionPeriodHours: int,
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],

InternalFailureExceptionTypeDef#

# InternalFailureExceptionTypeDef definition

class InternalFailureExceptionTypeDef(TypedDict):
    message: NotRequired[str],

KMSAccessDeniedExceptionTypeDef#

# KMSAccessDeniedExceptionTypeDef definition

class KMSAccessDeniedExceptionTypeDef(TypedDict):
    message: NotRequired[str],

KMSDisabledExceptionTypeDef#

# KMSDisabledExceptionTypeDef definition

class KMSDisabledExceptionTypeDef(TypedDict):
    message: NotRequired[str],

KMSInvalidStateExceptionTypeDef#

# KMSInvalidStateExceptionTypeDef definition

class KMSInvalidStateExceptionTypeDef(TypedDict):
    message: NotRequired[str],

KMSNotFoundExceptionTypeDef#

# KMSNotFoundExceptionTypeDef definition

class KMSNotFoundExceptionTypeDef(TypedDict):
    message: NotRequired[str],

KMSOptInRequiredTypeDef#

# KMSOptInRequiredTypeDef definition

class KMSOptInRequiredTypeDef(TypedDict):
    message: NotRequired[str],

KMSThrottlingExceptionTypeDef#

# KMSThrottlingExceptionTypeDef definition

class KMSThrottlingExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ListStreamsInputRequestTypeDef#

# ListStreamsInputRequestTypeDef definition

class ListStreamsInputRequestTypeDef(TypedDict):
    Limit: NotRequired[int],
    ExclusiveStartStreamName: NotRequired[str],
    NextToken: NotRequired[str],

ListTagsForStreamInputRequestTypeDef#

# ListTagsForStreamInputRequestTypeDef definition

class ListTagsForStreamInputRequestTypeDef(TypedDict):
    StreamName: NotRequired[str],
    ExclusiveStartTagKey: NotRequired[str],
    Limit: NotRequired[int],
    StreamARN: NotRequired[str],

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    Key: str,
    Value: NotRequired[str],

MergeShardsInputRequestTypeDef#

# MergeShardsInputRequestTypeDef definition

class MergeShardsInputRequestTypeDef(TypedDict):
    ShardToMerge: str,
    AdjacentShardToMerge: str,
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],

PutRecordsResultEntryTypeDef#

# PutRecordsResultEntryTypeDef definition

class PutRecordsResultEntryTypeDef(TypedDict):
    SequenceNumber: NotRequired[str],
    ShardId: NotRequired[str],
    ErrorCode: NotRequired[str],
    ErrorMessage: NotRequired[str],

PutResourcePolicyInputRequestTypeDef#

# PutResourcePolicyInputRequestTypeDef definition

class PutResourcePolicyInputRequestTypeDef(TypedDict):
    ResourceARN: str,
    Policy: str,

RegisterStreamConsumerInputRequestTypeDef#

# RegisterStreamConsumerInputRequestTypeDef definition

class RegisterStreamConsumerInputRequestTypeDef(TypedDict):
    StreamARN: str,
    ConsumerName: str,

RemoveTagsFromStreamInputRequestTypeDef#

# RemoveTagsFromStreamInputRequestTypeDef definition

class RemoveTagsFromStreamInputRequestTypeDef(TypedDict):
    TagKeys: Sequence[str],
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],

ResourceInUseExceptionTypeDef#

# ResourceInUseExceptionTypeDef definition

class ResourceInUseExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ResourceNotFoundExceptionTypeDef#

# ResourceNotFoundExceptionTypeDef definition

class ResourceNotFoundExceptionTypeDef(TypedDict):
    message: NotRequired[str],

SequenceNumberRangeTypeDef#

# SequenceNumberRangeTypeDef definition

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

SplitShardInputRequestTypeDef#

# SplitShardInputRequestTypeDef definition

class SplitShardInputRequestTypeDef(TypedDict):
    ShardToSplit: str,
    NewStartingHashKey: str,
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],

StartStreamEncryptionInputRequestTypeDef#

# StartStreamEncryptionInputRequestTypeDef definition

class StartStreamEncryptionInputRequestTypeDef(TypedDict):
    EncryptionType: EncryptionTypeType,  # (1)
    KeyId: str,
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],
  1. See EncryptionTypeType

StopStreamEncryptionInputRequestTypeDef#

# StopStreamEncryptionInputRequestTypeDef definition

class StopStreamEncryptionInputRequestTypeDef(TypedDict):
    EncryptionType: EncryptionTypeType,  # (1)
    KeyId: str,
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],
  1. See EncryptionTypeType

UpdateShardCountInputRequestTypeDef#

# UpdateShardCountInputRequestTypeDef definition

class UpdateShardCountInputRequestTypeDef(TypedDict):
    TargetShardCount: int,
    ScalingType: ScalingTypeType,  # (1)
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],
  1. See ScalingTypeType

PutRecordInputRequestTypeDef#

# PutRecordInputRequestTypeDef definition

class PutRecordInputRequestTypeDef(TypedDict):
    Data: Union[str, bytes, IO[Any], StreamingBody],
    PartitionKey: str,
    StreamName: NotRequired[str],
    ExplicitHashKey: NotRequired[str],
    SequenceNumberForOrdering: NotRequired[str],
    StreamARN: NotRequired[str],

PutRecordsRequestEntryTypeDef#

# PutRecordsRequestEntryTypeDef definition

class PutRecordsRequestEntryTypeDef(TypedDict):
    Data: Union[str, bytes, IO[Any], StreamingBody],
    PartitionKey: str,
    ExplicitHashKey: NotRequired[str],

ChildShardTypeDef#

# ChildShardTypeDef definition

class ChildShardTypeDef(TypedDict):
    ShardId: str,
    ParentShards: List[str],
    HashKeyRange: HashKeyRangeTypeDef,  # (1)
  1. See HashKeyRangeTypeDef

CreateStreamInputRequestTypeDef#

# CreateStreamInputRequestTypeDef definition

class CreateStreamInputRequestTypeDef(TypedDict):
    StreamName: str,
    ShardCount: NotRequired[int],
    StreamModeDetails: NotRequired[StreamModeDetailsTypeDef],  # (1)
  1. See StreamModeDetailsTypeDef

StreamSummaryTypeDef#

# StreamSummaryTypeDef definition

class StreamSummaryTypeDef(TypedDict):
    StreamName: str,
    StreamARN: str,
    StreamStatus: StreamStatusType,  # (1)
    StreamModeDetails: NotRequired[StreamModeDetailsTypeDef],  # (2)
    StreamCreationTimestamp: NotRequired[datetime],
  1. See StreamStatusType
  2. See StreamModeDetailsTypeDef

UpdateStreamModeInputRequestTypeDef#

# UpdateStreamModeInputRequestTypeDef definition

class UpdateStreamModeInputRequestTypeDef(TypedDict):
    StreamARN: str,
    StreamModeDetails: StreamModeDetailsTypeDef,  # (1)
  1. See StreamModeDetailsTypeDef

DescribeLimitsOutputTypeDef#

# DescribeLimitsOutputTypeDef definition

class DescribeLimitsOutputTypeDef(TypedDict):
    ShardLimit: int,
    OpenShardCount: int,
    OnDemandStreamCount: int,
    OnDemandStreamCountLimit: int,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

DescribeStreamConsumerOutputTypeDef#

# DescribeStreamConsumerOutputTypeDef definition

class DescribeStreamConsumerOutputTypeDef(TypedDict):
    ConsumerDescription: ConsumerDescriptionTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ConsumerDescriptionTypeDef
  2. See ResponseMetadataTypeDef

EmptyResponseMetadataTypeDef#

# EmptyResponseMetadataTypeDef definition

class EmptyResponseMetadataTypeDef(TypedDict):
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

EnhancedMonitoringOutputTypeDef#

# EnhancedMonitoringOutputTypeDef definition

class EnhancedMonitoringOutputTypeDef(TypedDict):
    StreamName: str,
    CurrentShardLevelMetrics: List[MetricsNameType],  # (1)
    DesiredShardLevelMetrics: List[MetricsNameType],  # (1)
    StreamARN: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See MetricsNameType
  2. See MetricsNameType
  3. See ResponseMetadataTypeDef

GetResourcePolicyOutputTypeDef#

# GetResourcePolicyOutputTypeDef definition

class GetResourcePolicyOutputTypeDef(TypedDict):
    Policy: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetShardIteratorOutputTypeDef#

# GetShardIteratorOutputTypeDef definition

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

ListStreamConsumersOutputTypeDef#

# ListStreamConsumersOutputTypeDef definition

class ListStreamConsumersOutputTypeDef(TypedDict):
    Consumers: List[ConsumerTypeDef],  # (1)
    NextToken: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ConsumerTypeDef
  2. See ResponseMetadataTypeDef

PutRecordOutputTypeDef#

# PutRecordOutputTypeDef definition

class PutRecordOutputTypeDef(TypedDict):
    ShardId: str,
    SequenceNumber: str,
    EncryptionType: EncryptionTypeType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See EncryptionTypeType
  2. See ResponseMetadataTypeDef

RegisterStreamConsumerOutputTypeDef#

# RegisterStreamConsumerOutputTypeDef definition

class RegisterStreamConsumerOutputTypeDef(TypedDict):
    Consumer: ConsumerTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ConsumerTypeDef
  2. See ResponseMetadataTypeDef

UpdateShardCountOutputTypeDef#

# UpdateShardCountOutputTypeDef definition

class UpdateShardCountOutputTypeDef(TypedDict):
    StreamName: str,
    CurrentShardCount: int,
    TargetShardCount: int,
    StreamARN: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

DescribeStreamInputDescribeStreamPaginateTypeDef#

# DescribeStreamInputDescribeStreamPaginateTypeDef definition

class DescribeStreamInputDescribeStreamPaginateTypeDef(TypedDict):
    StreamName: NotRequired[str],
    StreamARN: NotRequired[str],
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListStreamsInputListStreamsPaginateTypeDef#

# ListStreamsInputListStreamsPaginateTypeDef definition

class ListStreamsInputListStreamsPaginateTypeDef(TypedDict):
    ExclusiveStartStreamName: NotRequired[str],
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

DescribeStreamInputStreamExistsWaitTypeDef#

# DescribeStreamInputStreamExistsWaitTypeDef definition

class DescribeStreamInputStreamExistsWaitTypeDef(TypedDict):
    StreamName: NotRequired[str],
    Limit: NotRequired[int],
    ExclusiveStartShardId: NotRequired[str],
    StreamARN: NotRequired[str],
    WaiterConfig: NotRequired[WaiterConfigTypeDef],  # (1)
  1. See WaiterConfigTypeDef

DescribeStreamInputStreamNotExistsWaitTypeDef#

# DescribeStreamInputStreamNotExistsWaitTypeDef definition

class DescribeStreamInputStreamNotExistsWaitTypeDef(TypedDict):
    StreamName: NotRequired[str],
    Limit: NotRequired[int],
    ExclusiveStartShardId: NotRequired[str],
    StreamARN: NotRequired[str],
    WaiterConfig: NotRequired[WaiterConfigTypeDef],  # (1)
  1. See WaiterConfigTypeDef

StreamDescriptionSummaryTypeDef#

# StreamDescriptionSummaryTypeDef definition

class StreamDescriptionSummaryTypeDef(TypedDict):
    StreamName: str,
    StreamARN: str,
    StreamStatus: StreamStatusType,  # (1)
    RetentionPeriodHours: int,
    StreamCreationTimestamp: datetime,
    EnhancedMonitoring: List[EnhancedMetricsTypeDef],  # (3)
    OpenShardCount: int,
    StreamModeDetails: NotRequired[StreamModeDetailsTypeDef],  # (2)
    EncryptionType: NotRequired[EncryptionTypeType],  # (4)
    KeyId: NotRequired[str],
    ConsumerCount: NotRequired[int],
  1. See StreamStatusType
  2. See StreamModeDetailsTypeDef
  3. See EnhancedMetricsTypeDef
  4. See EncryptionTypeType

GetShardIteratorInputRequestTypeDef#

# GetShardIteratorInputRequestTypeDef definition

class GetShardIteratorInputRequestTypeDef(TypedDict):
    ShardId: str,
    ShardIteratorType: ShardIteratorTypeType,  # (1)
    StreamName: NotRequired[str],
    StartingSequenceNumber: NotRequired[str],
    Timestamp: NotRequired[Union[datetime, str]],
    StreamARN: NotRequired[str],
  1. See ShardIteratorTypeType

ListStreamConsumersInputListStreamConsumersPaginateTypeDef#

# ListStreamConsumersInputListStreamConsumersPaginateTypeDef definition

class ListStreamConsumersInputListStreamConsumersPaginateTypeDef(TypedDict):
    StreamARN: str,
    StreamCreationTimestamp: NotRequired[Union[datetime, str]],
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListStreamConsumersInputRequestTypeDef#

# ListStreamConsumersInputRequestTypeDef definition

class ListStreamConsumersInputRequestTypeDef(TypedDict):
    StreamARN: str,
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],
    StreamCreationTimestamp: NotRequired[Union[datetime, str]],

ShardFilterTypeDef#

# ShardFilterTypeDef definition

class ShardFilterTypeDef(TypedDict):
    Type: ShardFilterTypeType,  # (1)
    ShardId: NotRequired[str],
    Timestamp: NotRequired[Union[datetime, str]],
  1. See ShardFilterTypeType

StartingPositionTypeDef#

# StartingPositionTypeDef definition

class StartingPositionTypeDef(TypedDict):
    Type: ShardIteratorTypeType,  # (1)
    SequenceNumber: NotRequired[str],
    Timestamp: NotRequired[Union[datetime, str]],
  1. See ShardIteratorTypeType

ListTagsForStreamOutputTypeDef#

# ListTagsForStreamOutputTypeDef definition

class ListTagsForStreamOutputTypeDef(TypedDict):
    Tags: List[TagTypeDef],  # (1)
    HasMoreTags: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See TagTypeDef
  2. See ResponseMetadataTypeDef

PutRecordsOutputTypeDef#

# PutRecordsOutputTypeDef definition

class PutRecordsOutputTypeDef(TypedDict):
    FailedRecordCount: int,
    Records: List[PutRecordsResultEntryTypeDef],  # (1)
    EncryptionType: EncryptionTypeType,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See PutRecordsResultEntryTypeDef
  2. See EncryptionTypeType
  3. See ResponseMetadataTypeDef

ShardTypeDef#

# ShardTypeDef definition

class ShardTypeDef(TypedDict):
    ShardId: str,
    HashKeyRange: HashKeyRangeTypeDef,  # (1)
    SequenceNumberRange: SequenceNumberRangeTypeDef,  # (2)
    ParentShardId: NotRequired[str],
    AdjacentParentShardId: NotRequired[str],
  1. See <