Skip to content

Type definitions#

Index > SQS > Type definitions

Auto-generated documentation for SQS type annotations stubs module mypy-boto3-sqs.

BlobTypeDef#

# BlobTypeDef definition

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

MessageAttributeValueUnionTypeDef#

# MessageAttributeValueUnionTypeDef definition

MessageAttributeValueUnionTypeDef = Union[
    MessageAttributeValueTypeDef,  # (1)
    MessageAttributeValueOutputTypeDef,  # (2)
]
  1. See MessageAttributeValueTypeDef
  2. See MessageAttributeValueOutputTypeDef

AddPermissionRequestQueueAddPermissionTypeDef#

# AddPermissionRequestQueueAddPermissionTypeDef definition

class AddPermissionRequestQueueAddPermissionTypeDef(TypedDict):
    Label: str,
    AWSAccountIds: Sequence[str],
    Actions: Sequence[str],

AddPermissionRequestRequestTypeDef#

# AddPermissionRequestRequestTypeDef definition

class AddPermissionRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    Label: str,
    AWSAccountIds: Sequence[str],
    Actions: Sequence[str],

BatchResultErrorEntryTypeDef#

# BatchResultErrorEntryTypeDef definition

class BatchResultErrorEntryTypeDef(TypedDict):
    Id: str,
    SenderFault: bool,
    Code: str,
    Message: NotRequired[str],

CancelMessageMoveTaskRequestRequestTypeDef#

# CancelMessageMoveTaskRequestRequestTypeDef definition

class CancelMessageMoveTaskRequestRequestTypeDef(TypedDict):
    TaskHandle: str,

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

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

ChangeMessageVisibilityBatchRequestEntryTypeDef#

# ChangeMessageVisibilityBatchRequestEntryTypeDef definition

class ChangeMessageVisibilityBatchRequestEntryTypeDef(TypedDict):
    Id: str,
    ReceiptHandle: str,
    VisibilityTimeout: NotRequired[int],

ChangeMessageVisibilityBatchResultEntryTypeDef#

# ChangeMessageVisibilityBatchResultEntryTypeDef definition

class ChangeMessageVisibilityBatchResultEntryTypeDef(TypedDict):
    Id: str,

ChangeMessageVisibilityRequestMessageChangeVisibilityTypeDef#

# ChangeMessageVisibilityRequestMessageChangeVisibilityTypeDef definition

class ChangeMessageVisibilityRequestMessageChangeVisibilityTypeDef(TypedDict):
    VisibilityTimeout: int,

ChangeMessageVisibilityRequestRequestTypeDef#

# ChangeMessageVisibilityRequestRequestTypeDef definition

class ChangeMessageVisibilityRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    ReceiptHandle: str,
    VisibilityTimeout: int,

CreateQueueRequestRequestTypeDef#

# CreateQueueRequestRequestTypeDef definition

class CreateQueueRequestRequestTypeDef(TypedDict):
    QueueName: str,
    Attributes: NotRequired[Mapping[QueueAttributeNameType, str]],  # (1)
    tags: NotRequired[Mapping[str, str]],
  1. See QueueAttributeNameType

CreateQueueRequestServiceResourceCreateQueueTypeDef#

# CreateQueueRequestServiceResourceCreateQueueTypeDef definition

class CreateQueueRequestServiceResourceCreateQueueTypeDef(TypedDict):
    QueueName: str,
    Attributes: NotRequired[Mapping[QueueAttributeNameType, str]],  # (1)
    tags: NotRequired[Mapping[str, str]],
  1. See QueueAttributeNameType

DeleteMessageBatchRequestEntryTypeDef#

# DeleteMessageBatchRequestEntryTypeDef definition

class DeleteMessageBatchRequestEntryTypeDef(TypedDict):
    Id: str,
    ReceiptHandle: str,

DeleteMessageBatchResultEntryTypeDef#

# DeleteMessageBatchResultEntryTypeDef definition

class DeleteMessageBatchResultEntryTypeDef(TypedDict):
    Id: str,

DeleteMessageRequestRequestTypeDef#

# DeleteMessageRequestRequestTypeDef definition

class DeleteMessageRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    ReceiptHandle: str,

DeleteQueueRequestRequestTypeDef#

# DeleteQueueRequestRequestTypeDef definition

class DeleteQueueRequestRequestTypeDef(TypedDict):
    QueueUrl: str,

GetQueueAttributesRequestRequestTypeDef#

# GetQueueAttributesRequestRequestTypeDef definition

class GetQueueAttributesRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    AttributeNames: NotRequired[Sequence[QueueAttributeFilterType]],  # (1)
  1. See QueueAttributeFilterType

GetQueueUrlRequestRequestTypeDef#

# GetQueueUrlRequestRequestTypeDef definition

class GetQueueUrlRequestRequestTypeDef(TypedDict):
    QueueName: str,
    QueueOwnerAWSAccountId: NotRequired[str],

GetQueueUrlRequestServiceResourceGetQueueByNameTypeDef#

# GetQueueUrlRequestServiceResourceGetQueueByNameTypeDef definition

class GetQueueUrlRequestServiceResourceGetQueueByNameTypeDef(TypedDict):
    QueueName: str,
    QueueOwnerAWSAccountId: NotRequired[str],

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

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

ListDeadLetterSourceQueuesRequestRequestTypeDef#

# ListDeadLetterSourceQueuesRequestRequestTypeDef definition

class ListDeadLetterSourceQueuesRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

ListMessageMoveTasksRequestRequestTypeDef#

# ListMessageMoveTasksRequestRequestTypeDef definition

class ListMessageMoveTasksRequestRequestTypeDef(TypedDict):
    SourceArn: str,
    MaxResults: NotRequired[int],

ListMessageMoveTasksResultEntryTypeDef#

# ListMessageMoveTasksResultEntryTypeDef definition

class ListMessageMoveTasksResultEntryTypeDef(TypedDict):
    TaskHandle: NotRequired[str],
    Status: NotRequired[str],
    SourceArn: NotRequired[str],
    DestinationArn: NotRequired[str],
    MaxNumberOfMessagesPerSecond: NotRequired[int],
    ApproximateNumberOfMessagesMoved: NotRequired[int],
    ApproximateNumberOfMessagesToMove: NotRequired[int],
    FailureReason: NotRequired[str],
    StartedTimestamp: NotRequired[int],

ListQueueTagsRequestRequestTypeDef#

# ListQueueTagsRequestRequestTypeDef definition

class ListQueueTagsRequestRequestTypeDef(TypedDict):
    QueueUrl: str,

ListQueuesRequestRequestTypeDef#

# ListQueuesRequestRequestTypeDef definition

class ListQueuesRequestRequestTypeDef(TypedDict):
    QueueNamePrefix: NotRequired[str],
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

MessageAttributeValueOutputTypeDef#

# MessageAttributeValueOutputTypeDef definition

class MessageAttributeValueOutputTypeDef(TypedDict):
    DataType: str,
    StringValue: NotRequired[str],
    BinaryValue: NotRequired[bytes],
    StringListValues: NotRequired[list[str]],
    BinaryListValues: NotRequired[list[bytes]],

PurgeQueueRequestRequestTypeDef#

# PurgeQueueRequestRequestTypeDef definition

class PurgeQueueRequestRequestTypeDef(TypedDict):
    QueueUrl: str,

ReceiveMessageRequestQueueReceiveMessagesTypeDef#

# ReceiveMessageRequestQueueReceiveMessagesTypeDef definition

class ReceiveMessageRequestQueueReceiveMessagesTypeDef(TypedDict):
    AttributeNames: NotRequired[Sequence[QueueAttributeFilterType]],  # (1)
    MessageSystemAttributeNames: NotRequired[Sequence[MessageSystemAttributeNameType]],  # (2)
    MessageAttributeNames: NotRequired[Sequence[str]],
    MaxNumberOfMessages: NotRequired[int],
    VisibilityTimeout: NotRequired[int],
    WaitTimeSeconds: NotRequired[int],
    ReceiveRequestAttemptId: NotRequired[str],
  1. See QueueAttributeFilterType
  2. See MessageSystemAttributeNameType

ReceiveMessageRequestRequestTypeDef#

# ReceiveMessageRequestRequestTypeDef definition

class ReceiveMessageRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    AttributeNames: NotRequired[Sequence[QueueAttributeFilterType]],  # (1)
    MessageSystemAttributeNames: NotRequired[Sequence[MessageSystemAttributeNameType]],  # (2)
    MessageAttributeNames: NotRequired[Sequence[str]],
    MaxNumberOfMessages: NotRequired[int],
    VisibilityTimeout: NotRequired[int],
    WaitTimeSeconds: NotRequired[int],
    ReceiveRequestAttemptId: NotRequired[str],
  1. See QueueAttributeFilterType
  2. See MessageSystemAttributeNameType

RemovePermissionRequestQueueRemovePermissionTypeDef#

# RemovePermissionRequestQueueRemovePermissionTypeDef definition

class RemovePermissionRequestQueueRemovePermissionTypeDef(TypedDict):
    Label: str,

RemovePermissionRequestRequestTypeDef#

# RemovePermissionRequestRequestTypeDef definition

class RemovePermissionRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    Label: str,

SendMessageBatchResultEntryTypeDef#

# SendMessageBatchResultEntryTypeDef definition

class SendMessageBatchResultEntryTypeDef(TypedDict):
    Id: str,
    MessageId: str,
    MD5OfMessageBody: str,
    MD5OfMessageAttributes: NotRequired[str],
    MD5OfMessageSystemAttributes: NotRequired[str],
    SequenceNumber: NotRequired[str],

SetQueueAttributesRequestQueueSetAttributesTypeDef#

# SetQueueAttributesRequestQueueSetAttributesTypeDef definition

class SetQueueAttributesRequestQueueSetAttributesTypeDef(TypedDict):
    Attributes: Mapping[QueueAttributeNameType, str],  # (1)
  1. See QueueAttributeNameType

SetQueueAttributesRequestRequestTypeDef#

# SetQueueAttributesRequestRequestTypeDef definition

class SetQueueAttributesRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    Attributes: Mapping[QueueAttributeNameType, str],  # (1)
  1. See QueueAttributeNameType

StartMessageMoveTaskRequestRequestTypeDef#

# StartMessageMoveTaskRequestRequestTypeDef definition

class StartMessageMoveTaskRequestRequestTypeDef(TypedDict):
    SourceArn: str,
    DestinationArn: NotRequired[str],
    MaxNumberOfMessagesPerSecond: NotRequired[int],

TagQueueRequestRequestTypeDef#

# TagQueueRequestRequestTypeDef definition

class TagQueueRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    Tags: Mapping[str, str],

UntagQueueRequestRequestTypeDef#

# UntagQueueRequestRequestTypeDef definition

class UntagQueueRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    TagKeys: Sequence[str],

MessageAttributeValueTypeDef#

# MessageAttributeValueTypeDef definition

class MessageAttributeValueTypeDef(TypedDict):
    DataType: str,
    StringValue: NotRequired[str],
    BinaryValue: NotRequired[BlobTypeDef],
    StringListValues: NotRequired[Sequence[str]],
    BinaryListValues: NotRequired[Sequence[BlobTypeDef]],

MessageSystemAttributeValueTypeDef#

# MessageSystemAttributeValueTypeDef definition

class MessageSystemAttributeValueTypeDef(TypedDict):
    DataType: str,
    StringValue: NotRequired[str],
    BinaryValue: NotRequired[BlobTypeDef],
    StringListValues: NotRequired[Sequence[str]],
    BinaryListValues: NotRequired[Sequence[BlobTypeDef]],

CancelMessageMoveTaskResultTypeDef#

# CancelMessageMoveTaskResultTypeDef definition

class CancelMessageMoveTaskResultTypeDef(TypedDict):
    ApproximateNumberOfMessagesMoved: int,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

CreateQueueResultTypeDef#

# CreateQueueResultTypeDef definition

class CreateQueueResultTypeDef(TypedDict):
    QueueUrl: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

EmptyResponseMetadataTypeDef#

# EmptyResponseMetadataTypeDef definition

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

GetQueueAttributesResultTypeDef#

# GetQueueAttributesResultTypeDef definition

class GetQueueAttributesResultTypeDef(TypedDict):
    Attributes: dict[QueueAttributeNameType, str],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See QueueAttributeNameType
  2. See ResponseMetadataTypeDef

GetQueueUrlResultTypeDef#

# GetQueueUrlResultTypeDef definition

class GetQueueUrlResultTypeDef(TypedDict):
    QueueUrl: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ListDeadLetterSourceQueuesResultTypeDef#

# ListDeadLetterSourceQueuesResultTypeDef definition

class ListDeadLetterSourceQueuesResultTypeDef(TypedDict):
    queueUrls: list[str],
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
    NextToken: NotRequired[str],
  1. See ResponseMetadataTypeDef

ListQueueTagsResultTypeDef#

# ListQueueTagsResultTypeDef definition

class ListQueueTagsResultTypeDef(TypedDict):
    Tags: dict[str, str],
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ListQueuesResultTypeDef#

# ListQueuesResultTypeDef definition

class ListQueuesResultTypeDef(TypedDict):
    QueueUrls: list[str],
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
    NextToken: NotRequired[str],
  1. See ResponseMetadataTypeDef

SendMessageResultTypeDef#

# SendMessageResultTypeDef definition

class SendMessageResultTypeDef(TypedDict):
    MD5OfMessageBody: str,
    MD5OfMessageAttributes: str,
    MD5OfMessageSystemAttributes: str,
    MessageId: str,
    SequenceNumber: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

StartMessageMoveTaskResultTypeDef#

# StartMessageMoveTaskResultTypeDef definition

class StartMessageMoveTaskResultTypeDef(TypedDict):
    TaskHandle: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ChangeMessageVisibilityBatchRequestQueueChangeMessageVisibilityBatchTypeDef#

# ChangeMessageVisibilityBatchRequestQueueChangeMessageVisibilityBatchTypeDef definition

class ChangeMessageVisibilityBatchRequestQueueChangeMessageVisibilityBatchTypeDef(TypedDict):
    Entries: Sequence[ChangeMessageVisibilityBatchRequestEntryTypeDef],  # (1)
  1. See ChangeMessageVisibilityBatchRequestEntryTypeDef

ChangeMessageVisibilityBatchRequestRequestTypeDef#

# ChangeMessageVisibilityBatchRequestRequestTypeDef definition

class ChangeMessageVisibilityBatchRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    Entries: Sequence[ChangeMessageVisibilityBatchRequestEntryTypeDef],  # (1)
  1. See ChangeMessageVisibilityBatchRequestEntryTypeDef

ChangeMessageVisibilityBatchResultTypeDef#

# ChangeMessageVisibilityBatchResultTypeDef definition

class ChangeMessageVisibilityBatchResultTypeDef(TypedDict):
    Successful: list[ChangeMessageVisibilityBatchResultEntryTypeDef],  # (1)
    Failed: list[BatchResultErrorEntryTypeDef],  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See ChangeMessageVisibilityBatchResultEntryTypeDef
  2. See BatchResultErrorEntryTypeDef
  3. See ResponseMetadataTypeDef

DeleteMessageBatchRequestQueueDeleteMessagesTypeDef#

# DeleteMessageBatchRequestQueueDeleteMessagesTypeDef definition

class DeleteMessageBatchRequestQueueDeleteMessagesTypeDef(TypedDict):
    Entries: Sequence[DeleteMessageBatchRequestEntryTypeDef],  # (1)
  1. See DeleteMessageBatchRequestEntryTypeDef

DeleteMessageBatchRequestRequestTypeDef#

# DeleteMessageBatchRequestRequestTypeDef definition

class DeleteMessageBatchRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    Entries: Sequence[DeleteMessageBatchRequestEntryTypeDef],  # (1)
  1. See DeleteMessageBatchRequestEntryTypeDef

DeleteMessageBatchResultTypeDef#

# DeleteMessageBatchResultTypeDef definition

class DeleteMessageBatchResultTypeDef(TypedDict):
    Successful: list[DeleteMessageBatchResultEntryTypeDef],  # (1)
    Failed: list[BatchResultErrorEntryTypeDef],  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See DeleteMessageBatchResultEntryTypeDef
  2. See BatchResultErrorEntryTypeDef
  3. See ResponseMetadataTypeDef

ListDeadLetterSourceQueuesRequestPaginateTypeDef#

# ListDeadLetterSourceQueuesRequestPaginateTypeDef definition

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

ListQueuesRequestPaginateTypeDef#

# ListQueuesRequestPaginateTypeDef definition

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

ListMessageMoveTasksResultTypeDef#

# ListMessageMoveTasksResultTypeDef definition

class ListMessageMoveTasksResultTypeDef(TypedDict):
    Results: list[ListMessageMoveTasksResultEntryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ListMessageMoveTasksResultEntryTypeDef
  2. See ResponseMetadataTypeDef

MessageTypeDef#

# MessageTypeDef definition

class MessageTypeDef(TypedDict):
    MessageId: NotRequired[str],
    ReceiptHandle: NotRequired[str],
    MD5OfBody: NotRequired[str],
    Body: NotRequired[str],
    Attributes: NotRequired[dict[MessageSystemAttributeNameType, str]],  # (1)
    MD5OfMessageAttributes: NotRequired[str],
    MessageAttributes: NotRequired[dict[str, MessageAttributeValueOutputTypeDef]],  # (2)
  1. See MessageSystemAttributeNameType
  2. See MessageAttributeValueOutputTypeDef

SendMessageBatchResultTypeDef#

# SendMessageBatchResultTypeDef definition

class SendMessageBatchResultTypeDef(TypedDict):
    Successful: list[SendMessageBatchResultEntryTypeDef],  # (1)
    Failed: list[BatchResultErrorEntryTypeDef],  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See SendMessageBatchResultEntryTypeDef
  2. See BatchResultErrorEntryTypeDef
  3. See ResponseMetadataTypeDef

SendMessageBatchRequestEntryTypeDef#

# SendMessageBatchRequestEntryTypeDef definition

class SendMessageBatchRequestEntryTypeDef(TypedDict):
    Id: str,
    MessageBody: str,
    DelaySeconds: NotRequired[int],
    MessageAttributes: NotRequired[Mapping[str, MessageAttributeValueTypeDef]],  # (1)
    MessageSystemAttributes: NotRequired[Mapping[MessageSystemAttributeNameForSendsType, MessageSystemAttributeValueTypeDef]],  # (2)
    MessageDeduplicationId: NotRequired[str],
    MessageGroupId: NotRequired[str],
  1. See MessageAttributeValueTypeDef
  2. See MessageSystemAttributeNameForSendsType MessageSystemAttributeValueTypeDef

SendMessageRequestQueueSendMessageTypeDef#

# SendMessageRequestQueueSendMessageTypeDef definition

class SendMessageRequestQueueSendMessageTypeDef(TypedDict):
    MessageBody: str,
    DelaySeconds: NotRequired[int],
    MessageAttributes: NotRequired[Mapping[str, MessageAttributeValueTypeDef]],  # (1)
    MessageSystemAttributes: NotRequired[Mapping[MessageSystemAttributeNameForSendsType, MessageSystemAttributeValueTypeDef]],  # (2)
    MessageDeduplicationId: NotRequired[str],
    MessageGroupId: NotRequired[str],
  1. See MessageAttributeValueTypeDef
  2. See MessageSystemAttributeNameForSendsType MessageSystemAttributeValueTypeDef

ReceiveMessageResultTypeDef#

# ReceiveMessageResultTypeDef definition

class ReceiveMessageResultTypeDef(TypedDict):
    Messages: list[MessageTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See MessageTypeDef
  2. See ResponseMetadataTypeDef

SendMessageRequestRequestTypeDef#

# SendMessageRequestRequestTypeDef definition

class SendMessageRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    MessageBody: str,
    DelaySeconds: NotRequired[int],
    MessageAttributes: NotRequired[Mapping[str, MessageAttributeValueUnionTypeDef]],  # (1)
    MessageSystemAttributes: NotRequired[Mapping[MessageSystemAttributeNameForSendsType, MessageSystemAttributeValueTypeDef]],  # (2)
    MessageDeduplicationId: NotRequired[str],
    MessageGroupId: NotRequired[str],
  1. See MessageAttributeValueTypeDef MessageAttributeValueOutputTypeDef
  2. See MessageSystemAttributeNameForSendsType MessageSystemAttributeValueTypeDef

SendMessageBatchRequestQueueSendMessagesTypeDef#

# SendMessageBatchRequestQueueSendMessagesTypeDef definition

class SendMessageBatchRequestQueueSendMessagesTypeDef(TypedDict):
    Entries: Sequence[SendMessageBatchRequestEntryTypeDef],  # (1)
  1. See SendMessageBatchRequestEntryTypeDef

SendMessageBatchRequestRequestTypeDef#

# SendMessageBatchRequestRequestTypeDef definition

class SendMessageBatchRequestRequestTypeDef(TypedDict):
    QueueUrl: str,
    Entries: Sequence[SendMessageBatchRequestEntryTypeDef],  # (1)
  1. See SendMessageBatchRequestEntryTypeDef