Skip to content

Type definitions#

Index > SNS > Type definitions

Auto-generated documentation for SNS type annotations stubs module mypy-boto3-sns.

BlobTypeDef#

# BlobTypeDef definition

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

AddPermissionInputRequestTypeDef#

# AddPermissionInputRequestTypeDef definition

class AddPermissionInputRequestTypeDef(TypedDict):
    TopicArn: str,
    Label: str,
    AWSAccountId: Sequence[str],
    ActionName: Sequence[str],

AddPermissionInputTopicAddPermissionTypeDef#

# AddPermissionInputTopicAddPermissionTypeDef definition

class AddPermissionInputTopicAddPermissionTypeDef(TypedDict):
    Label: str,
    AWSAccountId: Sequence[str],
    ActionName: Sequence[str],

BatchResultErrorEntryTypeDef#

# BatchResultErrorEntryTypeDef definition

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

CheckIfPhoneNumberIsOptedOutInputRequestTypeDef#

# CheckIfPhoneNumberIsOptedOutInputRequestTypeDef definition

class CheckIfPhoneNumberIsOptedOutInputRequestTypeDef(TypedDict):
    phoneNumber: str,

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

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

ConfirmSubscriptionInputRequestTypeDef#

# ConfirmSubscriptionInputRequestTypeDef definition

class ConfirmSubscriptionInputRequestTypeDef(TypedDict):
    TopicArn: str,
    Token: str,
    AuthenticateOnUnsubscribe: NotRequired[str],

ConfirmSubscriptionInputTopicConfirmSubscriptionTypeDef#

# ConfirmSubscriptionInputTopicConfirmSubscriptionTypeDef definition

class ConfirmSubscriptionInputTopicConfirmSubscriptionTypeDef(TypedDict):
    Token: str,
    AuthenticateOnUnsubscribe: NotRequired[str],

CreatePlatformApplicationInputRequestTypeDef#

# CreatePlatformApplicationInputRequestTypeDef definition

class CreatePlatformApplicationInputRequestTypeDef(TypedDict):
    Name: str,
    Platform: str,
    Attributes: Mapping[str, str],

CreatePlatformApplicationInputServiceResourceCreatePlatformApplicationTypeDef#

# CreatePlatformApplicationInputServiceResourceCreatePlatformApplicationTypeDef definition

class CreatePlatformApplicationInputServiceResourceCreatePlatformApplicationTypeDef(TypedDict):
    Name: str,
    Platform: str,
    Attributes: Mapping[str, str],

CreatePlatformEndpointInputPlatformApplicationCreatePlatformEndpointTypeDef#

# CreatePlatformEndpointInputPlatformApplicationCreatePlatformEndpointTypeDef definition

class CreatePlatformEndpointInputPlatformApplicationCreatePlatformEndpointTypeDef(TypedDict):
    Token: str,
    CustomUserData: NotRequired[str],
    Attributes: NotRequired[Mapping[str, str]],

CreatePlatformEndpointInputRequestTypeDef#

# CreatePlatformEndpointInputRequestTypeDef definition

class CreatePlatformEndpointInputRequestTypeDef(TypedDict):
    PlatformApplicationArn: str,
    Token: str,
    CustomUserData: NotRequired[str],
    Attributes: NotRequired[Mapping[str, str]],

CreateSMSSandboxPhoneNumberInputRequestTypeDef#

# CreateSMSSandboxPhoneNumberInputRequestTypeDef definition

class CreateSMSSandboxPhoneNumberInputRequestTypeDef(TypedDict):
    PhoneNumber: str,
    LanguageCode: NotRequired[LanguageCodeStringType],  # (1)
  1. See LanguageCodeStringType

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    Key: str,
    Value: str,

DeleteEndpointInputRequestTypeDef#

# DeleteEndpointInputRequestTypeDef definition

class DeleteEndpointInputRequestTypeDef(TypedDict):
    EndpointArn: str,

DeletePlatformApplicationInputRequestTypeDef#

# DeletePlatformApplicationInputRequestTypeDef definition

class DeletePlatformApplicationInputRequestTypeDef(TypedDict):
    PlatformApplicationArn: str,

DeleteSMSSandboxPhoneNumberInputRequestTypeDef#

# DeleteSMSSandboxPhoneNumberInputRequestTypeDef definition

class DeleteSMSSandboxPhoneNumberInputRequestTypeDef(TypedDict):
    PhoneNumber: str,

DeleteTopicInputRequestTypeDef#

# DeleteTopicInputRequestTypeDef definition

class DeleteTopicInputRequestTypeDef(TypedDict):
    TopicArn: str,

EndpointTypeDef#

# EndpointTypeDef definition

class EndpointTypeDef(TypedDict):
    EndpointArn: NotRequired[str],
    Attributes: NotRequired[Dict[str, str]],

GetDataProtectionPolicyInputRequestTypeDef#

# GetDataProtectionPolicyInputRequestTypeDef definition

class GetDataProtectionPolicyInputRequestTypeDef(TypedDict):
    ResourceArn: str,

GetEndpointAttributesInputRequestTypeDef#

# GetEndpointAttributesInputRequestTypeDef definition

class GetEndpointAttributesInputRequestTypeDef(TypedDict):
    EndpointArn: str,

GetPlatformApplicationAttributesInputRequestTypeDef#

# GetPlatformApplicationAttributesInputRequestTypeDef definition

class GetPlatformApplicationAttributesInputRequestTypeDef(TypedDict):
    PlatformApplicationArn: str,

GetSMSAttributesInputRequestTypeDef#

# GetSMSAttributesInputRequestTypeDef definition

class GetSMSAttributesInputRequestTypeDef(TypedDict):
    attributes: NotRequired[Sequence[str]],

GetSubscriptionAttributesInputRequestTypeDef#

# GetSubscriptionAttributesInputRequestTypeDef definition

class GetSubscriptionAttributesInputRequestTypeDef(TypedDict):
    SubscriptionArn: str,

GetTopicAttributesInputRequestTypeDef#

# GetTopicAttributesInputRequestTypeDef definition

class GetTopicAttributesInputRequestTypeDef(TypedDict):
    TopicArn: str,

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

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

ListEndpointsByPlatformApplicationInputRequestTypeDef#

# ListEndpointsByPlatformApplicationInputRequestTypeDef definition

class ListEndpointsByPlatformApplicationInputRequestTypeDef(TypedDict):
    PlatformApplicationArn: str,
    NextToken: NotRequired[str],

ListOriginationNumbersRequestRequestTypeDef#

# ListOriginationNumbersRequestRequestTypeDef definition

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

PhoneNumberInformationTypeDef#

# PhoneNumberInformationTypeDef definition

class PhoneNumberInformationTypeDef(TypedDict):
    CreatedAt: NotRequired[datetime],
    PhoneNumber: NotRequired[str],
    Status: NotRequired[str],
    Iso2CountryCode: NotRequired[str],
    RouteType: NotRequired[RouteTypeType],  # (1)
    NumberCapabilities: NotRequired[List[NumberCapabilityType]],  # (2)
  1. See RouteTypeType
  2. See NumberCapabilityType

ListPhoneNumbersOptedOutInputRequestTypeDef#

# ListPhoneNumbersOptedOutInputRequestTypeDef definition

class ListPhoneNumbersOptedOutInputRequestTypeDef(TypedDict):
    nextToken: NotRequired[str],

ListPlatformApplicationsInputRequestTypeDef#

# ListPlatformApplicationsInputRequestTypeDef definition

class ListPlatformApplicationsInputRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],

PlatformApplicationTypeDef#

# PlatformApplicationTypeDef definition

class PlatformApplicationTypeDef(TypedDict):
    PlatformApplicationArn: NotRequired[str],
    Attributes: NotRequired[Dict[str, str]],

ListSMSSandboxPhoneNumbersInputRequestTypeDef#

# ListSMSSandboxPhoneNumbersInputRequestTypeDef definition

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

SMSSandboxPhoneNumberTypeDef#

# SMSSandboxPhoneNumberTypeDef definition

class SMSSandboxPhoneNumberTypeDef(TypedDict):
    PhoneNumber: NotRequired[str],
    Status: NotRequired[SMSSandboxPhoneNumberVerificationStatusType],  # (1)
  1. See SMSSandboxPhoneNumberVerificationStatusType

ListSubscriptionsByTopicInputRequestTypeDef#

# ListSubscriptionsByTopicInputRequestTypeDef definition

class ListSubscriptionsByTopicInputRequestTypeDef(TypedDict):
    TopicArn: str,
    NextToken: NotRequired[str],

SubscriptionTypeDef#

# SubscriptionTypeDef definition

class SubscriptionTypeDef(TypedDict):
    SubscriptionArn: NotRequired[str],
    Owner: NotRequired[str],
    Protocol: NotRequired[str],
    Endpoint: NotRequired[str],
    TopicArn: NotRequired[str],

ListSubscriptionsInputRequestTypeDef#

# ListSubscriptionsInputRequestTypeDef definition

class ListSubscriptionsInputRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],

ListTagsForResourceRequestRequestTypeDef#

# ListTagsForResourceRequestRequestTypeDef definition

class ListTagsForResourceRequestRequestTypeDef(TypedDict):
    ResourceArn: str,

ListTopicsInputRequestTypeDef#

# ListTopicsInputRequestTypeDef definition

class ListTopicsInputRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],

TopicTypeDef#

# TopicTypeDef definition

class TopicTypeDef(TypedDict):
    TopicArn: NotRequired[str],

OptInPhoneNumberInputRequestTypeDef#

# OptInPhoneNumberInputRequestTypeDef definition

class OptInPhoneNumberInputRequestTypeDef(TypedDict):
    phoneNumber: str,

PublishBatchResultEntryTypeDef#

# PublishBatchResultEntryTypeDef definition

class PublishBatchResultEntryTypeDef(TypedDict):
    Id: NotRequired[str],
    MessageId: NotRequired[str],
    SequenceNumber: NotRequired[str],

PutDataProtectionPolicyInputRequestTypeDef#

# PutDataProtectionPolicyInputRequestTypeDef definition

class PutDataProtectionPolicyInputRequestTypeDef(TypedDict):
    ResourceArn: str,
    DataProtectionPolicy: str,

RemovePermissionInputRequestTypeDef#

# RemovePermissionInputRequestTypeDef definition

class RemovePermissionInputRequestTypeDef(TypedDict):
    TopicArn: str,
    Label: str,

RemovePermissionInputTopicRemovePermissionTypeDef#

# RemovePermissionInputTopicRemovePermissionTypeDef definition

class RemovePermissionInputTopicRemovePermissionTypeDef(TypedDict):
    Label: str,

SetEndpointAttributesInputPlatformEndpointSetAttributesTypeDef#

# SetEndpointAttributesInputPlatformEndpointSetAttributesTypeDef definition

class SetEndpointAttributesInputPlatformEndpointSetAttributesTypeDef(TypedDict):
    Attributes: Mapping[str, str],

SetEndpointAttributesInputRequestTypeDef#

# SetEndpointAttributesInputRequestTypeDef definition

class SetEndpointAttributesInputRequestTypeDef(TypedDict):
    EndpointArn: str,
    Attributes: Mapping[str, str],

SetPlatformApplicationAttributesInputPlatformApplicationSetAttributesTypeDef#

# SetPlatformApplicationAttributesInputPlatformApplicationSetAttributesTypeDef definition

class SetPlatformApplicationAttributesInputPlatformApplicationSetAttributesTypeDef(TypedDict):
    Attributes: Mapping[str, str],

SetPlatformApplicationAttributesInputRequestTypeDef#

# SetPlatformApplicationAttributesInputRequestTypeDef definition

class SetPlatformApplicationAttributesInputRequestTypeDef(TypedDict):
    PlatformApplicationArn: str,
    Attributes: Mapping[str, str],

SetSMSAttributesInputRequestTypeDef#

# SetSMSAttributesInputRequestTypeDef definition

class SetSMSAttributesInputRequestTypeDef(TypedDict):
    attributes: Mapping[str, str],

SetSubscriptionAttributesInputRequestTypeDef#

# SetSubscriptionAttributesInputRequestTypeDef definition

class SetSubscriptionAttributesInputRequestTypeDef(TypedDict):
    SubscriptionArn: str,
    AttributeName: str,
    AttributeValue: NotRequired[str],

SetSubscriptionAttributesInputSubscriptionSetAttributesTypeDef#

# SetSubscriptionAttributesInputSubscriptionSetAttributesTypeDef definition

class SetSubscriptionAttributesInputSubscriptionSetAttributesTypeDef(TypedDict):
    AttributeName: str,
    AttributeValue: NotRequired[str],

SetTopicAttributesInputRequestTypeDef#

# SetTopicAttributesInputRequestTypeDef definition

class SetTopicAttributesInputRequestTypeDef(TypedDict):
    TopicArn: str,
    AttributeName: str,
    AttributeValue: NotRequired[str],

SetTopicAttributesInputTopicSetAttributesTypeDef#

# SetTopicAttributesInputTopicSetAttributesTypeDef definition

class SetTopicAttributesInputTopicSetAttributesTypeDef(TypedDict):
    AttributeName: str,
    AttributeValue: NotRequired[str],

SubscribeInputRequestTypeDef#

# SubscribeInputRequestTypeDef definition

class SubscribeInputRequestTypeDef(TypedDict):
    TopicArn: str,
    Protocol: str,
    Endpoint: NotRequired[str],
    Attributes: NotRequired[Mapping[str, str]],
    ReturnSubscriptionArn: NotRequired[bool],

SubscribeInputTopicSubscribeTypeDef#

# SubscribeInputTopicSubscribeTypeDef definition

class SubscribeInputTopicSubscribeTypeDef(TypedDict):
    Protocol: str,
    Endpoint: NotRequired[str],
    Attributes: NotRequired[Mapping[str, str]],
    ReturnSubscriptionArn: NotRequired[bool],

UnsubscribeInputRequestTypeDef#

# UnsubscribeInputRequestTypeDef definition

class UnsubscribeInputRequestTypeDef(TypedDict):
    SubscriptionArn: str,

UntagResourceRequestRequestTypeDef#

# UntagResourceRequestRequestTypeDef definition

class UntagResourceRequestRequestTypeDef(TypedDict):
    ResourceArn: str,
    TagKeys: Sequence[str],

VerifySMSSandboxPhoneNumberInputRequestTypeDef#

# VerifySMSSandboxPhoneNumberInputRequestTypeDef definition

class VerifySMSSandboxPhoneNumberInputRequestTypeDef(TypedDict):
    PhoneNumber: str,
    OneTimePassword: str,

MessageAttributeValueTypeDef#

# MessageAttributeValueTypeDef definition

class MessageAttributeValueTypeDef(TypedDict):
    DataType: str,
    StringValue: NotRequired[str],
    BinaryValue: NotRequired[Union[str, bytes, IO[Any], StreamingBody]],

CheckIfPhoneNumberIsOptedOutResponseTypeDef#

# CheckIfPhoneNumberIsOptedOutResponseTypeDef definition

class CheckIfPhoneNumberIsOptedOutResponseTypeDef(TypedDict):
    isOptedOut: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ConfirmSubscriptionResponseTypeDef#

# ConfirmSubscriptionResponseTypeDef definition

class ConfirmSubscriptionResponseTypeDef(TypedDict):
    SubscriptionArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

CreateEndpointResponseTypeDef#

# CreateEndpointResponseTypeDef definition

class CreateEndpointResponseTypeDef(TypedDict):
    EndpointArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

CreatePlatformApplicationResponseTypeDef#

# CreatePlatformApplicationResponseTypeDef definition