Skip to content

SNSClient

Index > SNS > SNSClient

Auto-generated documentation for SNS type annotations stubs module types-aiobotocore-sns.

SNSClient

Type annotations and code completion for session.client("sns") boto3 documentation

Usage example
from aioboto3.session import Session
from types_aiobotocore_sns.client import SNSClient

session = Session()
async with session.client("sns") as client:
    client: SNSClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("sns").exceptions structure.

Usage example
async with session.client("sns") as client:
    try:
        do_something(client)
    except (
            client.AuthorizationErrorException,
        client.BatchEntryIdsNotDistinctException,
        client.BatchRequestTooLongException,
        client.ClientError,
        client.ConcurrentAccessException,
        client.EmptyBatchRequestException,
        client.EndpointDisabledException,
        client.FilterPolicyLimitExceededException,
        client.InternalErrorException,
        client.InvalidBatchEntryIdException,
        client.InvalidParameterException,
        client.InvalidParameterValueException,
        client.InvalidSecurityException,
        client.KMSAccessDeniedException,
        client.KMSDisabledException,
        client.KMSInvalidStateException,
        client.KMSNotFoundException,
        client.KMSOptInRequired,
        client.KMSThrottlingException,
        client.NotFoundException,
        client.OptedOutException,
        client.PlatformApplicationDisabledException,
        client.ResourceNotFoundException,
        client.StaleTagException,
        client.SubscriptionLimitExceededException,
        client.TagLimitExceededException,
        client.TagPolicyException,
        client.ThrottledException,
        client.TooManyEntriesInBatchRequestException,
        client.TopicLimitExceededException,
        client.UserErrorException,
        client.ValidationException,
        client.VerificationException,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_sns.client import Exceptions

def handle_error(exc: Exceptions.AuthorizationErrorException) -> None:
    ...

Methods

add_permission

Adds a statement to a topic's access control policy, granting access for the specified Amazon Web Services accounts to the specified actions.

Type annotations and code completion for session.client("sns").add_permission method. boto3 documentation

Method definition
await def add_permission(
    self,
    *,
    TopicArn: str,
    Label: str,
    AWSAccountId: Sequence[str],
    ActionName: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: AddPermissionInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
    "Label": ...,
    "AWSAccountId": ...,
    "ActionName": ...,
}

parent.add_permission(**kwargs)
  1. See AddPermissionInputRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for session.client("sns").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

check_if_phone_number_is_opted_out

Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your Amazon Web Services account.

Type annotations and code completion for session.client("sns").check_if_phone_number_is_opted_out method. boto3 documentation

Method definition
await def check_if_phone_number_is_opted_out(
    self,
    *,
    phoneNumber: str,
) -> CheckIfPhoneNumberIsOptedOutResponseTypeDef:  # (1)
    ...
  1. See CheckIfPhoneNumberIsOptedOutResponseTypeDef
Usage example with kwargs
kwargs: CheckIfPhoneNumberIsOptedOutInputRequestTypeDef = {  # (1)
    "phoneNumber": ...,
}

parent.check_if_phone_number_is_opted_out(**kwargs)
  1. See CheckIfPhoneNumberIsOptedOutInputRequestTypeDef

close

Closes underlying endpoint connections.

Type annotations and code completion for session.client("sns").close method. boto3 documentation

Method definition
await def close(
    self,
) -> None:
    ...

confirm_subscription

Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier Subscribe action.

Type annotations and code completion for session.client("sns").confirm_subscription method. boto3 documentation

Method definition
await def confirm_subscription(
    self,
    *,
    TopicArn: str,
    Token: str,
    AuthenticateOnUnsubscribe: str = ...,
) -> ConfirmSubscriptionResponseTypeDef:  # (1)
    ...
  1. See ConfirmSubscriptionResponseTypeDef
Usage example with kwargs
kwargs: ConfirmSubscriptionInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
    "Token": ...,
}

parent.confirm_subscription(**kwargs)
  1. See ConfirmSubscriptionInputRequestTypeDef

create_platform_application

Creates a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile apps may register.

Type annotations and code completion for session.client("sns").create_platform_application method. boto3 documentation

Method definition
await def create_platform_application(
    self,
    *,
    Name: str,
    Platform: str,
    Attributes: Mapping[str, str],
) -> CreatePlatformApplicationResponseTypeDef:  # (1)
    ...
  1. See CreatePlatformApplicationResponseTypeDef
Usage example with kwargs
kwargs: CreatePlatformApplicationInputRequestTypeDef = {  # (1)
    "Name": ...,
    "Platform": ...,
    "Attributes": ...,
}

parent.create_platform_application(**kwargs)
  1. See CreatePlatformApplicationInputRequestTypeDef

create_platform_endpoint

Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS.

Type annotations and code completion for session.client("sns").create_platform_endpoint method. boto3 documentation

Method definition
await def create_platform_endpoint(
    self,
    *,
    PlatformApplicationArn: str,
    Token: str,
    CustomUserData: str = ...,
    Attributes: Mapping[str, str] = ...,
) -> CreateEndpointResponseTypeDef:  # (1)
    ...
  1. See CreateEndpointResponseTypeDef
Usage example with kwargs
kwargs: CreatePlatformEndpointInputRequestTypeDef = {  # (1)
    "PlatformApplicationArn": ...,
    "Token": ...,
}

parent.create_platform_endpoint(**kwargs)
  1. See CreatePlatformEndpointInputRequestTypeDef

create_sms_sandbox_phone_number

Adds a destination phone number to an Amazon Web Services account in the SMS sandbox and sends a one-time password (OTP) to that phone number.

Type annotations and code completion for session.client("sns").create_sms_sandbox_phone_number method. boto3 documentation

Method definition
await def create_sms_sandbox_phone_number(
    self,
    *,
    PhoneNumber: str,
    LanguageCode: LanguageCodeStringType = ...,  # (1)
) -> Dict[str, Any]:
    ...
  1. See LanguageCodeStringType
Usage example with kwargs
kwargs: CreateSMSSandboxPhoneNumberInputRequestTypeDef = {  # (1)
    "PhoneNumber": ...,
}

parent.create_sms_sandbox_phone_number(**kwargs)
  1. See CreateSMSSandboxPhoneNumberInputRequestTypeDef

create_topic

Creates a topic to which notifications can be published.

Type annotations and code completion for session.client("sns").create_topic method. boto3 documentation

Method definition
await def create_topic(
    self,
    *,
    Name: str,
    Attributes: Mapping[str, str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateTopicResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateTopicResponseTypeDef
Usage example with kwargs
kwargs: CreateTopicInputRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.create_topic(**kwargs)
  1. See CreateTopicInputRequestTypeDef

delete_endpoint

Deletes the endpoint for a device and mobile app from Amazon SNS.

Type annotations and code completion for session.client("sns").delete_endpoint method. boto3 documentation

Method definition
await def delete_endpoint(
    self,
    *,
    EndpointArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteEndpointInputRequestTypeDef = {  # (1)
    "EndpointArn": ...,
}

parent.delete_endpoint(**kwargs)
  1. See DeleteEndpointInputRequestTypeDef

delete_platform_application

Deletes a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).

Type annotations and code completion for session.client("sns").delete_platform_application method. boto3 documentation

Method definition
await def delete_platform_application(
    self,
    *,
    PlatformApplicationArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeletePlatformApplicationInputRequestTypeDef = {  # (1)
    "PlatformApplicationArn": ...,
}

parent.delete_platform_application(**kwargs)
  1. See DeletePlatformApplicationInputRequestTypeDef

delete_sms_sandbox_phone_number

Deletes an Amazon Web Services account's verified or pending phone number from the SMS sandbox.

Type annotations and code completion for session.client("sns").delete_sms_sandbox_phone_number method. boto3 documentation

Method definition
await def delete_sms_sandbox_phone_number(
    self,
    *,
    PhoneNumber: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteSMSSandboxPhoneNumberInputRequestTypeDef = {  # (1)
    "PhoneNumber": ...,
}

parent.delete_sms_sandbox_phone_number(**kwargs)
  1. See DeleteSMSSandboxPhoneNumberInputRequestTypeDef

delete_topic

Deletes a topic and all its subscriptions.

Type annotations and code completion for session.client("sns").delete_topic method. boto3 documentation

Method definition
await def delete_topic(
    self,
    *,
    TopicArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteTopicInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
}

parent.delete_topic(**kwargs)
  1. See DeleteTopicInputRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.client("sns").generate_presigned_url method. boto3 documentation

Method definition
await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_endpoint_attributes

Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS.

Type annotations and code completion for session.client("sns").get_endpoint_attributes method. boto3 documentation

Method definition
await def get_endpoint_attributes(
    self,
    *,
    EndpointArn: str,
) -> GetEndpointAttributesResponseTypeDef:  # (1)
    ...
  1. See GetEndpointAttributesResponseTypeDef
Usage example with kwargs
kwargs: GetEndpointAttributesInputRequestTypeDef = {  # (1)
    "EndpointArn": ...,
}

parent.get_endpoint_attributes(**kwargs)
  1. See GetEndpointAttributesInputRequestTypeDef

get_platform_application_attributes

Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).

Type annotations and code completion for session.client("sns").get_platform_application_attributes method. boto3 documentation

Method definition
await def get_platform_application_attributes(
    self,
    *,
    PlatformApplicationArn: str,
) -> GetPlatformApplicationAttributesResponseTypeDef:  # (1)
    ...
  1. See GetPlatformApplicationAttributesResponseTypeDef
Usage example with kwargs
kwargs: GetPlatformApplicationAttributesInputRequestTypeDef = {  # (1)
    "PlatformApplicationArn": ...,
}

parent.get_platform_application_attributes(**kwargs)
  1. See GetPlatformApplicationAttributesInputRequestTypeDef

get_sms_attributes

Returns the settings for sending SMS messages from your Amazon Web Services account.

Type annotations and code completion for session.client("sns").get_sms_attributes method. boto3 documentation

Method definition
await def get_sms_attributes(
    self,
    *,
    attributes: Sequence[str] = ...,
) -> GetSMSAttributesResponseTypeDef:  # (1)
    ...
  1. See GetSMSAttributesResponseTypeDef
Usage example with kwargs
kwargs: GetSMSAttributesInputRequestTypeDef = {  # (1)
    "attributes": ...,
}

parent.get_sms_attributes(**kwargs)
  1. See GetSMSAttributesInputRequestTypeDef

get_sms_sandbox_account_status

Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target Amazon Web Services Region.

Type annotations and code completion for session.client("sns").get_sms_sandbox_account_status method. boto3 documentation

Method definition
await def get_sms_sandbox_account_status(
    self,
) -> GetSMSSandboxAccountStatusResultTypeDef:  # (1)
    ...
  1. See GetSMSSandboxAccountStatusResultTypeDef

get_subscription_attributes

Returns all of the properties of a subscription.

Type annotations and code completion for session.client("sns").get_subscription_attributes method. boto3 documentation

Method definition
await def get_subscription_attributes(
    self,
    *,
    SubscriptionArn: str,
) -> GetSubscriptionAttributesResponseTypeDef:  # (1)
    ...
  1. See GetSubscriptionAttributesResponseTypeDef
Usage example with kwargs
kwargs: GetSubscriptionAttributesInputRequestTypeDef = {  # (1)
    "SubscriptionArn": ...,
}

parent.get_subscription_attributes(**kwargs)
  1. See GetSubscriptionAttributesInputRequestTypeDef

get_topic_attributes

Returns all of the properties of a topic.

Type annotations and code completion for session.client("sns").get_topic_attributes method. boto3 documentation

Method definition
await def get_topic_attributes(
    self,
    *,
    TopicArn: str,
) -> GetTopicAttributesResponseTypeDef:  # (1)
    ...
  1. See GetTopicAttributesResponseTypeDef
Usage example with kwargs
kwargs: GetTopicAttributesInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
}

parent.get_topic_attributes(**kwargs)
  1. See GetTopicAttributesInputRequestTypeDef

list_endpoints_by_platform_application

Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS.

Type annotations and code completion for session.client("sns").list_endpoints_by_platform_application method. boto3 documentation

Method definition
await def list_endpoints_by_platform_application(
    self,
    *,
    PlatformApplicationArn: str,
    NextToken: str = ...,
) -> ListEndpointsByPlatformApplicationResponseTypeDef:  # (1)
    ...
  1. See ListEndpointsByPlatformApplicationResponseTypeDef
Usage example with kwargs
kwargs: ListEndpointsByPlatformApplicationInputRequestTypeDef = {  # (1)
    "PlatformApplicationArn": ...,
}

parent.list_endpoints_by_platform_application(**kwargs)
  1. See ListEndpointsByPlatformApplicationInputRequestTypeDef

list_origination_numbers

Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata.

Type annotations and code completion for session.client("sns").list_origination_numbers method. boto3 documentation

Method definition
await def list_origination_numbers(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListOriginationNumbersResultTypeDef:  # (1)
    ...
  1. See ListOriginationNumbersResultTypeDef
Usage example with kwargs
kwargs: ListOriginationNumbersRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_origination_numbers(**kwargs)
  1. See ListOriginationNumbersRequestRequestTypeDef

list_phone_numbers_opted_out

Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.

Type annotations and code completion for session.client("sns").list_phone_numbers_opted_out method. boto3 documentation

Method definition
await def list_phone_numbers_opted_out(
    self,
    *,
    nextToken: str = ...,
) -> ListPhoneNumbersOptedOutResponseTypeDef:  # (1)
    ...
  1. See ListPhoneNumbersOptedOutResponseTypeDef
Usage example with kwargs
kwargs: ListPhoneNumbersOptedOutInputRequestTypeDef = {  # (1)
    "nextToken": ...,
}

parent.list_phone_numbers_opted_out(**kwargs)
  1. See ListPhoneNumbersOptedOutInputRequestTypeDef

list_platform_applications

Lists the platform application objects for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).

Type annotations and code completion for session.client("sns").list_platform_applications method. boto3 documentation

Method definition
await def list_platform_applications(
    self,
    *,
    NextToken: str = ...,
) -> ListPlatformApplicationsResponseTypeDef:  # (1)
    ...
  1. See ListPlatformApplicationsResponseTypeDef
Usage example with kwargs
kwargs: ListPlatformApplicationsInputRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_platform_applications(**kwargs)
  1. See ListPlatformApplicationsInputRequestTypeDef

list_sms_sandbox_phone_numbers

Lists the calling Amazon Web Services account's current verified and pending destination phone numbers in the SMS sandbox.

Type annotations and code completion for session.client("sns").list_sms_sandbox_phone_numbers method. boto3 documentation

Method definition
await def list_sms_sandbox_phone_numbers(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListSMSSandboxPhoneNumbersResultTypeDef:  # (1)
    ...
  1. See ListSMSSandboxPhoneNumbersResultTypeDef
Usage example with kwargs
kwargs: ListSMSSandboxPhoneNumbersInputRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_sms_sandbox_phone_numbers(**kwargs)
  1. See ListSMSSandboxPhoneNumbersInputRequestTypeDef

list_subscriptions

Returns a list of the requester's subscriptions.

Type annotations and code completion for session.client("sns").list_subscriptions method. boto3 documentation

Method definition
await def list_subscriptions(
    self,
    *,
    NextToken: str = ...,
) -> ListSubscriptionsResponseTypeDef:  # (1)
    ...
  1. See ListSubscriptionsResponseTypeDef
Usage example with kwargs
kwargs: ListSubscriptionsInputRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_subscriptions(**kwargs)
  1. See ListSubscriptionsInputRequestTypeDef

list_subscriptions_by_topic

Returns a list of the subscriptions to a specific topic.

Type annotations and code completion for session.client("sns").list_subscriptions_by_topic method. boto3 documentation

Method definition
await def list_subscriptions_by_topic(
    self,
    *,
    TopicArn: str,
    NextToken: str = ...,
) -> ListSubscriptionsByTopicResponseTypeDef:  # (1)
    ...
  1. See ListSubscriptionsByTopicResponseTypeDef
Usage example with kwargs
kwargs: ListSubscriptionsByTopicInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
}

parent.list_subscriptions_by_topic(**kwargs)
  1. See ListSubscriptionsByTopicInputRequestTypeDef

list_tags_for_resource

List all tags added to the specified Amazon SNS topic.

Type annotations and code completion for session.client("sns").list_tags_for_resource method. boto3 documentation

Method definition
await def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

list_topics

Returns a list of the requester's topics.

Type annotations and code completion for session.client("sns").list_topics method. boto3 documentation

Method definition
await def list_topics(
    self,
    *,
    NextToken: str = ...,
) -> ListTopicsResponseTypeDef:  # (1)
    ...
  1. See ListTopicsResponseTypeDef
Usage example with kwargs
kwargs: ListTopicsInputRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_topics(**kwargs)
  1. See ListTopicsInputRequestTypeDef

opt_in_phone_number

Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.

Type annotations and code completion for session.client("sns").opt_in_phone_number method. boto3 documentation

Method definition
await def opt_in_phone_number(
    self,
    *,
    phoneNumber: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: OptInPhoneNumberInputRequestTypeDef = {  # (1)
    "phoneNumber": ...,
}

parent.opt_in_phone_number(**kwargs)
  1. See OptInPhoneNumberInputRequestTypeDef

publish

Sends a message to an Amazon SNS topic, a text message (SMS message) directly to a phone number, or a message to a mobile platform endpoint (when you specify the TargetArn ).

Type annotations and code completion for session.client("sns").publish method. boto3 documentation

Method definition
await def publish(
    self,
    *,
    Message: str,
    TopicArn: str = ...,
    TargetArn: str = ...,
    PhoneNumber: str = ...,
    Subject: str = ...,
    MessageStructure: str = ...,
    MessageAttributes: Mapping[str, MessageAttributeValueTypeDef] = ...,  # (1)
    MessageDeduplicationId: str = ...,
    MessageGroupId: str = ...,
) -> PublishResponseTypeDef:  # (2)
    ...
  1. See MessageAttributeValueTypeDef
  2. See PublishResponseTypeDef
Usage example with kwargs
kwargs: PublishInputRequestTypeDef = {  # (1)
    "Message": ...,
}

parent.publish(**kwargs)
  1. See PublishInputRequestTypeDef

publish_batch

Publishes up to ten messages to the specified topic.

Type annotations and code completion for session.client("sns").publish_batch method. boto3 documentation

Method definition
await def publish_batch(
    self,
    *,
    TopicArn: str,
    PublishBatchRequestEntries: Sequence[PublishBatchRequestEntryTypeDef],  # (1)
) -> PublishBatchResponseTypeDef:  # (2)
    ...
  1. See PublishBatchRequestEntryTypeDef
  2. See PublishBatchResponseTypeDef
Usage example with kwargs
kwargs: PublishBatchInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
    "PublishBatchRequestEntries": ...,
}

parent.publish_batch(**kwargs)
  1. See PublishBatchInputRequestTypeDef

remove_permission

Removes a statement from a topic's access control policy.

Type annotations and code completion for session.client("sns").remove_permission method. boto3 documentation

Method definition
await def remove_permission(
    self,
    *,
    TopicArn: str,
    Label: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: RemovePermissionInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
    "Label": ...,
}

parent.remove_permission(**kwargs)
  1. See RemovePermissionInputRequestTypeDef

set_endpoint_attributes

Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS.

Type annotations and code completion for session.client("sns").set_endpoint_attributes method. boto3 documentation

Method definition
await def set_endpoint_attributes(
    self,
    *,
    EndpointArn: str,
    Attributes: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: SetEndpointAttributesInputRequestTypeDef = {  # (1)
    "EndpointArn": ...,
    "Attributes": ...,
}

parent.set_endpoint_attributes(**kwargs)
  1. See SetEndpointAttributesInputRequestTypeDef

set_platform_application_attributes

Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).

Type annotations and code completion for session.client("sns").set_platform_application_attributes method. boto3 documentation

Method definition
await def set_platform_application_attributes(
    self,
    *,
    PlatformApplicationArn: str,
    Attributes: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: SetPlatformApplicationAttributesInputRequestTypeDef = {  # (1)
    "PlatformApplicationArn": ...,
    "Attributes": ...,
}

parent.set_platform_application_attributes(**kwargs)
  1. See SetPlatformApplicationAttributesInputRequestTypeDef

set_sms_attributes

Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.

Type annotations and code completion for session.client("sns").set_sms_attributes method. boto3 documentation

Method definition
await def set_sms_attributes(
    self,
    *,
    attributes: Mapping[str, str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: SetSMSAttributesInputRequestTypeDef = {  # (1)
    "attributes": ...,
}

parent.set_sms_attributes(**kwargs)
  1. See SetSMSAttributesInputRequestTypeDef

set_subscription_attributes

Allows a subscription owner to set an attribute of the subscription to a new value.

Type annotations and code completion for session.client("sns").set_subscription_attributes method. boto3 documentation

Method definition
await def set_subscription_attributes(
    self,
    *,
    SubscriptionArn: str,
    AttributeName: str,
    AttributeValue: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: SetSubscriptionAttributesInputRequestTypeDef = {  # (1)
    "SubscriptionArn": ...,
    "AttributeName": ...,
}

parent.set_subscription_attributes(**kwargs)
  1. See SetSubscriptionAttributesInputRequestTypeDef

set_topic_attributes

Allows a topic owner to set an attribute of the topic to a new value.

Type annotations and code completion for session.client("sns").set_topic_attributes method. boto3 documentation

Method definition
await def set_topic_attributes(
    self,
    *,
    TopicArn: str,
    AttributeName: str,
    AttributeValue: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: SetTopicAttributesInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
    "AttributeName": ...,
}

parent.set_topic_attributes(**kwargs)
  1. See SetTopicAttributesInputRequestTypeDef

subscribe

Subscribes an endpoint to an Amazon SNS topic.

Type annotations and code completion for session.client("sns").subscribe method. boto3 documentation

Method definition
await def subscribe(
    self,
    *,
    TopicArn: str,
    Protocol: str,
    Endpoint: str = ...,
    Attributes: Mapping[str, str] = ...,
    ReturnSubscriptionArn: bool = ...,
) -> SubscribeResponseTypeDef:  # (1)
    ...
  1. See SubscribeResponseTypeDef
Usage example with kwargs
kwargs: SubscribeInputRequestTypeDef = {  # (1)
    "TopicArn": ...,
    "Protocol": ...,
}

parent.subscribe(**kwargs)
  1. See SubscribeInputRequestTypeDef

tag_resource

Add tags to the specified Amazon SNS topic.

Type annotations and code completion for session.client("sns").tag_resource method. boto3 documentation

Method definition
await def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

unsubscribe

Deletes a subscription.

Type annotations and code completion for session.client("sns").unsubscribe method. boto3 documentation

Method definition
await def unsubscribe(
    self,
    *,
    SubscriptionArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: UnsubscribeInputRequestTypeDef = {  # (1)
    "SubscriptionArn": ...,
}

parent.unsubscribe(**kwargs)
  1. See UnsubscribeInputRequestTypeDef

untag_resource

Remove tags from the specified Amazon SNS topic.

Type annotations and code completion for session.client("sns").untag_resource method. boto3 documentation

Method definition
await def untag_resource(
    self,
    *,
    ResourceArn: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

verify_sms_sandbox_phone_number

Verifies a destination phone number with a one-time password (OTP) for the calling Amazon Web Services account.

Type annotations and code completion for session.client("sns").verify_sms_sandbox_phone_number method. boto3 documentation

Method definition
await def verify_sms_sandbox_phone_number(
    self,
    *,
    PhoneNumber: str,
    OneTimePassword: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: VerifySMSSandboxPhoneNumberInputRequestTypeDef = {  # (1)
    "PhoneNumber": ...,
    "OneTimePassword": ...,
}

parent.verify_sms_sandbox_phone_number(**kwargs)
  1. See VerifySMSSandboxPhoneNumberInputRequestTypeDef

__aenter__

Type annotations and code completion for session.client("sns").__aenter__ method. boto3 documentation

Method definition
await def __aenter__(
    self,
) -> SNSClient:
    ...

__aexit__

Type annotations and code completion for session.client("sns").__aexit__ method. boto3 documentation

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator

Type annotations and code completion for session.client("sns").get_paginator method with overloads.