SNSClient#
Auto-generated documentation for SNS type annotations stubs module mypy-boto3-sns.
SNSClient#
Type annotations and code completion for boto3.client("sns")
.
boto3 documentation
# SNSClient usage example
from boto3.session import Session
from mypy_boto3_sns.client import SNSClient
def get_sns_client() -> SNSClient:
return Session().client("sns")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("sns").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("sns")
try:
do_something(client)
except (
client.exceptions.AuthorizationErrorException,
client.exceptions.BatchEntryIdsNotDistinctException,
client.exceptions.BatchRequestTooLongException,
client.exceptions.ClientError,
client.exceptions.ConcurrentAccessException,
client.exceptions.EmptyBatchRequestException,
client.exceptions.EndpointDisabledException,
client.exceptions.FilterPolicyLimitExceededException,
client.exceptions.InternalErrorException,
client.exceptions.InvalidBatchEntryIdException,
client.exceptions.InvalidParameterException,
client.exceptions.InvalidParameterValueException,
client.exceptions.InvalidSecurityException,
client.exceptions.InvalidStateException,
client.exceptions.KMSAccessDeniedException,
client.exceptions.KMSDisabledException,
client.exceptions.KMSInvalidStateException,
client.exceptions.KMSNotFoundException,
client.exceptions.KMSOptInRequired,
client.exceptions.KMSThrottlingException,
client.exceptions.NotFoundException,
client.exceptions.OptedOutException,
client.exceptions.PlatformApplicationDisabledException,
client.exceptions.ReplayLimitExceededException,
client.exceptions.ResourceNotFoundException,
client.exceptions.StaleTagException,
client.exceptions.SubscriptionLimitExceededException,
client.exceptions.TagLimitExceededException,
client.exceptions.TagPolicyException,
client.exceptions.ThrottledException,
client.exceptions.TooManyEntriesInBatchRequestException,
client.exceptions.TopicLimitExceededException,
client.exceptions.UserErrorException,
client.exceptions.ValidationException,
client.exceptions.VerificationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_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 boto3.client("sns").add_permission
method.
boto3 documentation
# add_permission method definition
def add_permission(
self,
*,
TopicArn: str,
Label: str,
AWSAccountId: Sequence[str],
ActionName: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# add_permission method usage example with argument unpacking
kwargs: AddPermissionInputRequestTypeDef = { # (1)
"TopicArn": ...,
"Label": ...,
"AWSAccountId": ...,
"ActionName": ...,
}
parent.add_permission(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("sns").can_paginate
method.
boto3 documentation
# can_paginate 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 boto3.client("sns").check_if_phone_number_is_opted_out
method.
boto3 documentation
# check_if_phone_number_is_opted_out method definition
def check_if_phone_number_is_opted_out(
self,
*,
phoneNumber: str,
) -> CheckIfPhoneNumberIsOptedOutResponseTypeDef: # (1)
...
# check_if_phone_number_is_opted_out method usage example with argument unpacking
kwargs: CheckIfPhoneNumberIsOptedOutInputRequestTypeDef = { # (1)
"phoneNumber": ...,
}
parent.check_if_phone_number_is_opted_out(**kwargs)
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("sns").close
method.
boto3 documentation
# close method definition
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 boto3.client("sns").confirm_subscription
method.
boto3 documentation
# confirm_subscription method definition
def confirm_subscription(
self,
*,
TopicArn: str,
Token: str,
AuthenticateOnUnsubscribe: str = ...,
) -> ConfirmSubscriptionResponseTypeDef: # (1)
...
# confirm_subscription method usage example with argument unpacking
kwargs: ConfirmSubscriptionInputRequestTypeDef = { # (1)
"TopicArn": ...,
"Token": ...,
}
parent.confirm_subscription(**kwargs)
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 boto3.client("sns").create_platform_application
method.
boto3 documentation
# create_platform_application method definition
def create_platform_application(
self,
*,
Name: str,
Platform: str,
Attributes: Mapping[str, str],
) -> CreatePlatformApplicationResponseTypeDef: # (1)
...
# create_platform_application method usage example with argument unpacking
kwargs: CreatePlatformApplicationInputRequestTypeDef = { # (1)
"Name": ...,
"Platform": ...,
"Attributes": ...,
}
parent.create_platform_application(**kwargs)
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 boto3.client("sns").create_platform_endpoint
method.
boto3 documentation
# create_platform_endpoint method definition
def create_platform_endpoint(
self,
*,
PlatformApplicationArn: str,
Token: str,
CustomUserData: str = ...,
Attributes: Mapping[str, str] = ...,
) -> CreateEndpointResponseTypeDef: # (1)
...
# create_platform_endpoint method usage example with argument unpacking
kwargs: CreatePlatformEndpointInputRequestTypeDef = { # (1)
"PlatformApplicationArn": ...,
"Token": ...,
}
parent.create_platform_endpoint(**kwargs)
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 boto3.client("sns").create_sms_sandbox_phone_number
method.
boto3 documentation
# create_sms_sandbox_phone_number method definition
def create_sms_sandbox_phone_number(
self,
*,
PhoneNumber: str,
LanguageCode: LanguageCodeStringType = ..., # (1)
) -> Dict[str, Any]:
...
# create_sms_sandbox_phone_number method usage example with argument unpacking
kwargs: CreateSMSSandboxPhoneNumberInputRequestTypeDef = { # (1)
"PhoneNumber": ...,
}
parent.create_sms_sandbox_phone_number(**kwargs)
create_topic#
Creates a topic to which notifications can be published.
Type annotations and code completion for boto3.client("sns").create_topic
method.
boto3 documentation
# create_topic method definition
def create_topic(
self,
*,
Name: str,
Attributes: Mapping[str, str] = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
DataProtectionPolicy: str = ...,
) -> CreateTopicResponseTypeDef: # (2)
...
- See TagTypeDef
- See CreateTopicResponseTypeDef
# create_topic method usage example with argument unpacking
kwargs: CreateTopicInputRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_topic(**kwargs)
delete_endpoint#
Deletes the endpoint for a device and mobile app from Amazon SNS.
Type annotations and code completion for boto3.client("sns").delete_endpoint
method.
boto3 documentation
# delete_endpoint method definition
def delete_endpoint(
self,
*,
EndpointArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_endpoint method usage example with argument unpacking
kwargs: DeleteEndpointInputRequestTypeDef = { # (1)
"EndpointArn": ...,
}
parent.delete_endpoint(**kwargs)
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 boto3.client("sns").delete_platform_application
method.
boto3 documentation
# delete_platform_application method definition
def delete_platform_application(
self,
*,
PlatformApplicationArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_platform_application method usage example with argument unpacking
kwargs: DeletePlatformApplicationInputRequestTypeDef = { # (1)
"PlatformApplicationArn": ...,
}
parent.delete_platform_application(**kwargs)
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 boto3.client("sns").delete_sms_sandbox_phone_number
method.
boto3 documentation
# delete_sms_sandbox_phone_number method definition
def delete_sms_sandbox_phone_number(
self,
*,
PhoneNumber: str,
) -> Dict[str, Any]:
...
# delete_sms_sandbox_phone_number method usage example with argument unpacking
kwargs: DeleteSMSSandboxPhoneNumberInputRequestTypeDef = { # (1)
"PhoneNumber": ...,
}
parent.delete_sms_sandbox_phone_number(**kwargs)
delete_topic#
Deletes a topic and all its subscriptions.
Type annotations and code completion for boto3.client("sns").delete_topic
method.
boto3 documentation
# delete_topic method definition
def delete_topic(
self,
*,
TopicArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_topic method usage example with argument unpacking
kwargs: DeleteTopicInputRequestTypeDef = { # (1)
"TopicArn": ...,
}
parent.delete_topic(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("sns").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_data_protection_policy#
Retrieves the specified inline DataProtectionPolicy
document that is stored
in the specified Amazon SNS topic.
Type annotations and code completion for boto3.client("sns").get_data_protection_policy
method.
boto3 documentation
# get_data_protection_policy method definition
def get_data_protection_policy(
self,
*,
ResourceArn: str,
) -> GetDataProtectionPolicyResponseTypeDef: # (1)
...
# get_data_protection_policy method usage example with argument unpacking
kwargs: GetDataProtectionPolicyInputRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.get_data_protection_policy(**kwargs)
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 boto3.client("sns").get_endpoint_attributes
method.
boto3 documentation
# get_endpoint_attributes method definition
def get_endpoint_attributes(
self,
*,
EndpointArn: str,
) -> GetEndpointAttributesResponseTypeDef: # (1)
...
# get_endpoint_attributes method usage example with argument unpacking
kwargs: GetEndpointAttributesInputRequestTypeDef = { # (1)
"EndpointArn": ...,
}
parent.get_endpoint_attributes(**kwargs)
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 boto3.client("sns").get_platform_application_attributes
method.
boto3 documentation
# get_platform_application_attributes method definition
def get_platform_application_attributes(
self,
*,
PlatformApplicationArn: str,
) -> GetPlatformApplicationAttributesResponseTypeDef: # (1)
...
# get_platform_application_attributes method usage example with argument unpacking
kwargs: GetPlatformApplicationAttributesInputRequestTypeDef = { # (1)
"PlatformApplicationArn": ...,
}
parent.get_platform_application_attributes(**kwargs)
get_sms_attributes#
Returns the settings for sending SMS messages from your Amazon Web Services account.
Type annotations and code completion for boto3.client("sns").get_sms_attributes
method.
boto3 documentation
# get_sms_attributes method definition
def get_sms_attributes(
self,
*,
attributes: Sequence[str] = ...,
) -> GetSMSAttributesResponseTypeDef: # (1)
...
# get_sms_attributes method usage example with argument unpacking
kwargs: GetSMSAttributesInputRequestTypeDef = { # (1)
"attributes": ...,
}
parent.get_sms_attributes(**kwargs)
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 boto3.client("sns").get_sms_sandbox_account_status
method.
boto3 documentation
# get_sms_sandbox_account_status method definition
def get_sms_sandbox_account_status(
self,
) -> GetSMSSandboxAccountStatusResultTypeDef: # (1)
...
get_subscription_attributes#
Returns all of the properties of a subscription.
Type annotations and code completion for boto3.client("sns").get_subscription_attributes
method.
boto3 documentation
# get_subscription_attributes method definition
def get_subscription_attributes(
self,
*,
SubscriptionArn: str,
) -> GetSubscriptionAttributesResponseTypeDef: # (1)
...
# get_subscription_attributes method usage example with argument unpacking
kwargs: GetSubscriptionAttributesInputRequestTypeDef = { # (1)
"SubscriptionArn": ...,
}
parent.get_subscription_attributes(**kwargs)
get_topic_attributes#
Returns all of the properties of a topic.
Type annotations and code completion for boto3.client("sns").get_topic_attributes
method.
boto3 documentation
# get_topic_attributes method definition
def get_topic_attributes(
self,
*,
TopicArn: str,
) -> GetTopicAttributesResponseTypeDef: # (1)
...
# get_topic_attributes method usage example with argument unpacking
kwargs: GetTopicAttributesInputRequestTypeDef = { # (1)
"TopicArn": ...,
}
parent.get_topic_attributes(**kwargs)
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 boto3.client("sns").list_endpoints_by_platform_application
method.
boto3 documentation
# list_endpoints_by_platform_application method definition
def list_endpoints_by_platform_application(
self,
*,
PlatformApplicationArn: str,
NextToken: str = ...,
) -> ListEndpointsByPlatformApplicationResponseTypeDef: # (1)
...
# list_endpoints_by_platform_application method usage example with argument unpacking
kwargs: ListEndpointsByPlatformApplicationInputRequestTypeDef = { # (1)
"PlatformApplicationArn": ...,
}
parent.list_endpoints_by_platform_application(**kwargs)
list_origination_numbers#
Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata.
Type annotations and code completion for boto3.client("sns").list_origination_numbers
method.
boto3 documentation
# list_origination_numbers method definition
def list_origination_numbers(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListOriginationNumbersResultTypeDef: # (1)
...
# list_origination_numbers method usage example with argument unpacking
kwargs: ListOriginationNumbersRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_origination_numbers(**kwargs)
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 boto3.client("sns").list_phone_numbers_opted_out
method.
boto3 documentation
# list_phone_numbers_opted_out method definition
def list_phone_numbers_opted_out(
self,
*,
nextToken: str = ...,
) -> ListPhoneNumbersOptedOutResponseTypeDef: # (1)
...
# list_phone_numbers_opted_out method usage example with argument unpacking
kwargs: ListPhoneNumbersOptedOutInputRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.list_phone_numbers_opted_out(**kwargs)
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 boto3.client("sns").list_platform_applications
method.
boto3 documentation
# list_platform_applications method definition
def list_platform_applications(
self,
*,
NextToken: str = ...,
) -> ListPlatformApplicationsResponseTypeDef: # (1)
...
# list_platform_applications method usage example with argument unpacking
kwargs: ListPlatformApplicationsInputRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_platform_applications(**kwargs)
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 boto3.client("sns").list_sms_sandbox_phone_numbers
method.
boto3 documentation
# list_sms_sandbox_phone_numbers method definition
def list_sms_sandbox_phone_numbers(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListSMSSandboxPhoneNumbersResultTypeDef: # (1)
...
# list_sms_sandbox_phone_numbers method usage example with argument unpacking
kwargs: ListSMSSandboxPhoneNumbersInputRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_sms_sandbox_phone_numbers(**kwargs)
list_subscriptions#
Returns a list of the requester's subscriptions.
Type annotations and code completion for boto3.client("sns").list_subscriptions
method.
boto3 documentation
# list_subscriptions method definition
def list_subscriptions(
self,
*,
NextToken: str = ...,
) -> ListSubscriptionsResponseTypeDef: # (1)
...
# list_subscriptions method usage example with argument unpacking
kwargs: ListSubscriptionsInputRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_subscriptions(**kwargs)
list_subscriptions_by_topic#
Returns a list of the subscriptions to a specific topic.
Type annotations and code completion for boto3.client("sns").list_subscriptions_by_topic
method.
boto3 documentation
# list_subscriptions_by_topic method definition
def list_subscriptions_by_topic(
self,
*,
TopicArn: str,
NextToken: str = ...,
) -> ListSubscriptionsByTopicResponseTypeDef: # (1)
...
# list_subscriptions_by_topic method usage example with argument unpacking
kwargs: ListSubscriptionsByTopicInputRequestTypeDef = { # (1)
"TopicArn": ...,
}
parent.list_subscriptions_by_topic(**kwargs)
list_tags_for_resource#
List all tags added to the specified Amazon SNS topic.
Type annotations and code completion for boto3.client("sns").list_tags_for_resource
method.
boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
self,
*,
ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
list_topics#
Returns a list of the requester's topics.
Type annotations and code completion for boto3.client("sns").list_topics
method.
boto3 documentation
# list_topics method definition
def list_topics(
self,
*,
NextToken: str = ...,
) -> ListTopicsResponseTypeDef: # (1)
...
# list_topics method usage example with argument unpacking
kwargs: ListTopicsInputRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_topics(**kwargs)
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 boto3.client("sns").opt_in_phone_number
method.
boto3 documentation
# opt_in_phone_number method definition
def opt_in_phone_number(
self,
*,
phoneNumber: str,
) -> Dict[str, Any]:
...
# opt_in_phone_number method usage example with argument unpacking
kwargs: OptInPhoneNumberInputRequestTypeDef = { # (1)
"phoneNumber": ...,
}
parent.opt_in_phone_number(**kwargs)
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 boto3.client("sns").publish
method.
boto3 documentation
# publish method definition
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)
...
# publish method usage example with argument unpacking
kwargs: PublishInputRequestTypeDef = { # (1)
"Message": ...,
}
parent.publish(**kwargs)
publish_batch#
Publishes up to ten messages to the specified topic.
Type annotations and code completion for boto3.client("sns").publish_batch
method.
boto3 documentation
# publish_batch method definition
def publish_batch(
self,
*,
TopicArn: str,
PublishBatchRequestEntries: Sequence[PublishBatchRequestEntryTypeDef], # (1)
) -> PublishBatchResponseTypeDef: # (2)
...
# publish_batch method usage example with argument unpacking
kwargs: PublishBatchInputRequestTypeDef = { # (1)
"TopicArn": ...,
"PublishBatchRequestEntries": ...,
}
parent.publish_batch(**kwargs)
put_data_protection_policy#
Adds or updates an inline policy document that is stored in the specified Amazon SNS topic.
Type annotations and code completion for boto3.client("sns").put_data_protection_policy
method.
boto3 documentation
# put_data_protection_policy method definition
def put_data_protection_policy(
self,
*,
ResourceArn: str,
DataProtectionPolicy: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# put_data_protection_policy method usage example with argument unpacking
kwargs: PutDataProtectionPolicyInputRequestTypeDef = { # (1)
"ResourceArn": ...,
"DataProtectionPolicy": ...,
}
parent.put_data_protection_policy(**kwargs)
remove_permission#
Removes a statement from a topic's access control policy.
Type annotations and code completion for boto3.client("sns").remove_permission
method.
boto3 documentation
# remove_permission method definition
def remove_permission(
self,
*,
TopicArn: str,
Label: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# remove_permission method usage example with argument unpacking
kwargs: RemovePermissionInputRequestTypeDef = { # (1)
"TopicArn": ...,
"Label": ...,
}
parent.remove_permission(**kwargs)
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 boto3.client("sns").set_endpoint_attributes
method.
boto3 documentation
# set_endpoint_attributes method definition
def set_endpoint_attributes(
self,
*,
EndpointArn: str,
Attributes: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# set_endpoint_attributes method usage example with argument unpacking
kwargs: SetEndpointAttributesInputRequestTypeDef = { # (1)
"EndpointArn": ...,
"Attributes": ...,
}
parent.set_endpoint_attributes(**kwargs)
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 boto3.client("sns").set_platform_application_attributes
method.
boto3 documentation
# set_platform_application_attributes method definition
def set_platform_application_attributes(
self,
*,
PlatformApplicationArn: str,
Attributes: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# set_platform_application_attributes method usage example with argument unpacking
kwargs: SetPlatformApplicationAttributesInputRequestTypeDef = { # (1)
"PlatformApplicationArn": ...,
"Attributes": ...,
}
parent.set_platform_application_attributes(**kwargs)
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 boto3.client("sns").set_sms_attributes
method.
boto3 documentation
# set_sms_attributes method definition
def set_sms_attributes(
self,
*,
attributes: Mapping[str, str],
) -> Dict[str, Any]:
...
# set_sms_attributes method usage example with argument unpacking
kwargs: SetSMSAttributesInputRequestTypeDef = { # (1)
"attributes": ...,
}
parent.set_sms_attributes(**kwargs)
set_subscription_attributes#
Allows a subscription owner to set an attribute of the subscription to a new value.
Type annotations and code completion for boto3.client("sns").set_subscription_attributes
method.
boto3 documentation
# set_subscription_attributes method definition
def set_subscription_attributes(
self,
*,
SubscriptionArn: str,
AttributeName: str,
AttributeValue: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# set_subscription_attributes method usage example with argument unpacking
kwargs: SetSubscriptionAttributesInputRequestTypeDef = { # (1)
"SubscriptionArn": ...,
"AttributeName": ...,
}
parent.set_subscription_attributes(**kwargs)
set_topic_attributes#
Allows a topic owner to set an attribute of the topic to a new value.
Type annotations and code completion for boto3.client("sns").set_topic_attributes
method.
boto3 documentation
# set_topic_attributes method definition
def set_topic_attributes(
self,
*,
TopicArn: str,
AttributeName: str,
AttributeValue: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# set_topic_attributes method usage example with argument unpacking
kwargs: SetTopicAttributesInputRequestTypeDef = { # (1)
"TopicArn": ...,
"AttributeName": ...,
}
parent.set_topic_attributes(**kwargs)
subscribe#
Subscribes an endpoint to an Amazon SNS topic.
Type annotations and code completion for boto3.client("sns").subscribe
method.
boto3 documentation
# subscribe method definition
def subscribe(
self,
*,
TopicArn: str,
Protocol: str,
Endpoint: str = ...,
Attributes: Mapping[str, str] = ...,
ReturnSubscriptionArn: bool = ...,
) -> SubscribeResponseTypeDef: # (1)
...
# subscribe method usage example with argument unpacking
kwargs: SubscribeInputRequestTypeDef = { # (1)
"TopicArn": ...,
"Protocol": ...,
}
parent.subscribe(**kwargs)
tag_resource#
Add tags to the specified Amazon SNS topic.
Type annotations and code completion for boto3.client("sns").tag_resource
method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
ResourceArn: str,
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
unsubscribe#
Deletes a subscription.
Type annotations and code completion for boto3.client("sns").unsubscribe
method.
boto3 documentation
# unsubscribe method definition
def unsubscribe(
self,
*,
SubscriptionArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# unsubscribe method usage example with argument unpacking
kwargs: UnsubscribeInputRequestTypeDef = { # (1)
"SubscriptionArn": ...,
}
parent.unsubscribe(**kwargs)
untag_resource#
Remove tags from the specified Amazon SNS topic.
Type annotations and code completion for boto3.client("sns").untag_resource
method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
ResourceArn: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
"TagKeys": ...,
}
parent.untag_resource(**kwargs)
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 boto3.client("sns").verify_sms_sandbox_phone_number
method.
boto3 documentation
# verify_sms_sandbox_phone_number method definition
def verify_sms_sandbox_phone_number(
self,
*,
PhoneNumber: str,
OneTimePassword: str,
) -> Dict[str, Any]:
...
# verify_sms_sandbox_phone_number method usage example with argument unpacking
kwargs: VerifySMSSandboxPhoneNumberInputRequestTypeDef = { # (1)
"PhoneNumber": ...,
"OneTimePassword": ...,
}
parent.verify_sms_sandbox_phone_number(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("sns").get_paginator
method with overloads.
client.get_paginator("list_endpoints_by_platform_application")
-> ListEndpointsByPlatformApplicationPaginatorclient.get_paginator("list_origination_numbers")
-> ListOriginationNumbersPaginatorclient.get_paginator("list_phone_numbers_opted_out")
-> ListPhoneNumbersOptedOutPaginatorclient.get_paginator("list_platform_applications")
-> ListPlatformApplicationsPaginatorclient.get_paginator("list_sms_sandbox_phone_numbers")
-> ListSMSSandboxPhoneNumbersPaginatorclient.get_paginator("list_subscriptions_by_topic")
-> ListSubscriptionsByTopicPaginatorclient.get_paginator("list_subscriptions")
-> ListSubscriptionsPaginatorclient.get_paginator("list_topics")
-> ListTopicsPaginator