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
# SNSClient 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.
# SNSClient.exceptions usage example
async with session.client("sns") as client:
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)
# SNSClient.exceptions type checking example
from types_aiobotocore_sns.client import Exceptions
def handle_error(exc: Exceptions.AuthorizationErrorException) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for session.client("sns").can_paginate method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for session.client("sns").generate_presigned_url method.
boto3 documentation
# generate_presigned_url method definition
await def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
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
# add_permission method definition
await 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: AddPermissionInputTypeDef = { # (1)
"TopicArn": ...,
"Label": ...,
"AWSAccountId": ...,
"ActionName": ...,
}
parent.add_permission(**kwargs)
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
# check_if_phone_number_is_opted_out method definition
await 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: CheckIfPhoneNumberIsOptedOutInputTypeDef = { # (1)
"phoneNumber": ...,
}
parent.check_if_phone_number_is_opted_out(**kwargs)
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
# confirm_subscription method definition
await def confirm_subscription(
self,
*,
TopicArn: str,
Token: str,
AuthenticateOnUnsubscribe: str = ...,
) -> ConfirmSubscriptionResponseTypeDef: # (1)
...
# confirm_subscription method usage example with argument unpacking
kwargs: ConfirmSubscriptionInputTypeDef = { # (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 session.client("sns").create_platform_application method.
boto3 documentation
# create_platform_application method definition
await 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: CreatePlatformApplicationInputTypeDef = { # (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 session.client("sns").create_platform_endpoint method.
boto3 documentation
# create_platform_endpoint method definition
await 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: CreatePlatformEndpointInputTypeDef = { # (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 session.client("sns").create_sms_sandbox_phone_number method.
boto3 documentation
# create_sms_sandbox_phone_number method definition
await 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: CreateSMSSandboxPhoneNumberInputTypeDef = { # (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 session.client("sns").create_topic method.
boto3 documentation
# create_topic method definition
await def create_topic(
self,
*,
Name: str,
Attributes: Mapping[str, str] = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
DataProtectionPolicy: str = ...,
) -> CreateTopicResponseTypeDef: # (2)
...
- See
Sequence[TagTypeDef] - See CreateTopicResponseTypeDef
# create_topic method usage example with argument unpacking
kwargs: CreateTopicInputTypeDef = { # (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 session.client("sns").delete_endpoint method.
boto3 documentation
# delete_endpoint method definition
await def delete_endpoint(
self,
*,
EndpointArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_endpoint method usage example with argument unpacking
kwargs: DeleteEndpointInputTypeDef = { # (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 session.client("sns").delete_platform_application method.
boto3 documentation
# delete_platform_application method definition
await def delete_platform_application(
self,
*,
PlatformApplicationArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_platform_application method usage example with argument unpacking
kwargs: DeletePlatformApplicationInputTypeDef = { # (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 session.client("sns").delete_sms_sandbox_phone_number method.
boto3 documentation
# delete_sms_sandbox_phone_number method definition
await def delete_sms_sandbox_phone_number(
self,
*,
PhoneNumber: str,
) -> Dict[str, Any]:
...
# delete_sms_sandbox_phone_number method usage example with argument unpacking
kwargs: DeleteSMSSandboxPhoneNumberInputTypeDef = { # (1)
"PhoneNumber": ...,
}
parent.delete_sms_sandbox_phone_number(**kwargs)
delete_topic#
Deletes a topic and all its subscriptions.
Type annotations and code completion for session.client("sns").delete_topic method.
boto3 documentation
# delete_topic method definition
await def delete_topic(
self,
*,
TopicArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_topic method usage example with argument unpacking
kwargs: DeleteTopicInputTypeDef = { # (1)
"TopicArn": ...,
}
parent.delete_topic(**kwargs)
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 session.client("sns").get_data_protection_policy method.
boto3 documentation
# get_data_protection_policy method definition
await def get_data_protection_policy(
self,
*,
ResourceArn: str,
) -> GetDataProtectionPolicyResponseTypeDef: # (1)
...
# get_data_protection_policy method usage example with argument unpacking
kwargs: GetDataProtectionPolicyInputTypeDef = { # (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 session.client("sns").get_endpoint_attributes method.
boto3 documentation
# get_endpoint_attributes method definition
await def get_endpoint_attributes(
self,
*,
EndpointArn: str,
) -> GetEndpointAttributesResponseTypeDef: # (1)
...
# get_endpoint_attributes method usage example with argument unpacking
kwargs: GetEndpointAttributesInputTypeDef = { # (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 session.client("sns").get_platform_application_attributes method.
boto3 documentation
# get_platform_application_attributes method definition
await def get_platform_application_attributes(
self,
*,
PlatformApplicationArn: str,
) -> GetPlatformApplicationAttributesResponseTypeDef: # (1)
...
# get_platform_application_attributes method usage example with argument unpacking
kwargs: GetPlatformApplicationAttributesInputTypeDef = { # (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 session.client("sns").get_sms_attributes method.
boto3 documentation
# get_sms_attributes method definition
await def get_sms_attributes(
self,
*,
attributes: Sequence[str] = ...,
) -> GetSMSAttributesResponseTypeDef: # (1)
...
# get_sms_attributes method usage example with argument unpacking
kwargs: GetSMSAttributesInputTypeDef = { # (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 session.client("sns").get_sms_sandbox_account_status method.
boto3 documentation
# get_sms_sandbox_account_status method definition
await 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 session.client("sns").get_subscription_attributes method.
boto3 documentation
# get_subscription_attributes method definition
await def get_subscription_attributes(
self,
*,
SubscriptionArn: str,
) -> GetSubscriptionAttributesResponseTypeDef: # (1)
...
# get_subscription_attributes method usage example with argument unpacking
kwargs: GetSubscriptionAttributesInputTypeDef = { # (1)
"SubscriptionArn": ...,
}
parent.get_subscription_attributes(**kwargs)
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
# get_topic_attributes method definition
await def get_topic_attributes(
self,
*,
TopicArn: str,
) -> GetTopicAttributesResponseTypeDef: # (1)
...
# get_topic_attributes method usage example with argument unpacking
kwargs: GetTopicAttributesInputTypeDef = { # (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 session.client("sns").list_endpoints_by_platform_application method.
boto3 documentation
# list_endpoints_by_platform_application method definition
await 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: ListEndpointsByPlatformApplicationInputTypeDef = { # (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 session.client("sns").list_origination_numbers method.
boto3 documentation
# list_origination_numbers method definition
await def list_origination_numbers(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListOriginationNumbersResultTypeDef: # (1)
...
# list_origination_numbers method usage example with argument unpacking
kwargs: ListOriginationNumbersRequestTypeDef = { # (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 session.client("sns").list_phone_numbers_opted_out method.
boto3 documentation
# list_phone_numbers_opted_out method definition
await def list_phone_numbers_opted_out(
self,
*,
nextToken: str = ...,
) -> ListPhoneNumbersOptedOutResponseTypeDef: # (1)
...
# list_phone_numbers_opted_out method usage example with argument unpacking
kwargs: ListPhoneNumbersOptedOutInputTypeDef = { # (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 session.client("sns").list_platform_applications method.
boto3 documentation
# list_platform_applications method definition
await def list_platform_applications(
self,
*,
NextToken: str = ...,
) -> ListPlatformApplicationsResponseTypeDef: # (1)
...
# list_platform_applications method usage example with argument unpacking
kwargs: ListPlatformApplicationsInputTypeDef = { # (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 session.client("sns").list_sms_sandbox_phone_numbers method.
boto3 documentation
# list_sms_sandbox_phone_numbers method definition
await 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: ListSMSSandboxPhoneNumbersInputTypeDef = { # (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 session.client("sns").list_subscriptions method.
boto3 documentation
# list_subscriptions method definition
await def list_subscriptions(
self,
*,
NextToken: str = ...,
) -> ListSubscriptionsResponseTypeDef: # (1)
...
# list_subscriptions method usage example with argument unpacking
kwargs: ListSubscriptionsInputTypeDef = { # (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 session.client("sns").list_subscriptions_by_topic method.
boto3 documentation
# list_subscriptions_by_topic method definition
await def list_subscriptions_by_topic(
self,
*,
TopicArn: str,
NextToken: str = ...,
) -> ListSubscriptionsByTopicResponseTypeDef: # (1)
...
# list_subscriptions_by_topic method usage example with argument unpacking
kwargs: ListSubscriptionsByTopicInputTypeDef = { # (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 session.client("sns").list_tags_for_resource method.
boto3 documentation
# list_tags_for_resource method definition
await def list_tags_for_resource(
self,
*,
ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
list_topics#
Returns a list of the requester's topics.
Type annotations and code completion for session.client("sns").list_topics method.
boto3 documentation
# list_topics method definition
await def list_topics(
self,
*,
NextToken: str = ...,
) -> ListTopicsResponseTypeDef: # (1)
...
# list_topics method usage example with argument unpacking
kwargs: ListTopicsInputTypeDef = { # (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 session.client("sns").opt_in_phone_number method.
boto3 documentation
# opt_in_phone_number method definition
await def opt_in_phone_number(
self,
*,
phoneNumber: str,
) -> Dict[str, Any]:
...
# opt_in_phone_number method usage example with argument unpacking
kwargs: OptInPhoneNumberInputTypeDef = { # (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 session.client("sns").publish method.
boto3 documentation
# publish 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)
...
- See
Mapping[str, MessageAttributeValueTypeDef] - See PublishResponseTypeDef
# publish method usage example with argument unpacking
kwargs: PublishInputTypeDef = { # (1)
"Message": ...,
}
parent.publish(**kwargs)
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
# publish_batch method definition
await def publish_batch(
self,
*,
TopicArn: str,
PublishBatchRequestEntries: Sequence[PublishBatchRequestEntryTypeDef], # (1)
) -> PublishBatchResponseTypeDef: # (2)
...
- See
Sequence[PublishBatchRequestEntryTypeDef] - See PublishBatchResponseTypeDef
# publish_batch method usage example with argument unpacking
kwargs: PublishBatchInputTypeDef = { # (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 session.client("sns").put_data_protection_policy method.
boto3 documentation
# put_data_protection_policy method definition
await def put_data_protection_policy(
self,
*,
ResourceArn: str,
DataProtectionPolicy: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# put_data_protection_policy method usage example with argument unpacking
kwargs: PutDataProtectionPolicyInputTypeDef = { # (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 session.client("sns").remove_permission method.
boto3 documentation
# remove_permission method definition
await def remove_permission(
self,
*,
TopicArn: str,
Label: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# remove_permission method usage example with argument unpacking
kwargs: RemovePermissionInputTypeDef = { # (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 session.client("sns").set_endpoint_attributes method.
boto3 documentation
# set_endpoint_attributes method definition
await def set_endpoint_attributes(
self,
*,
EndpointArn: str,
Attributes: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# set_endpoint_attributes method usage example with argument unpacking
kwargs: SetEndpointAttributesInputTypeDef = { # (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 session.client("sns").set_platform_application_attributes method.
boto3 documentation
# set_platform_application_attributes method definition
await 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: SetPlatformApplicationAttributesInputTypeDef = { # (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 session.client("sns").set_sms_attributes method.
boto3 documentation
# set_sms_attributes method definition
await def set_sms_attributes(
self,
*,
attributes: Mapping[str, str],
) -> Dict[str, Any]:
...
# set_sms_attributes method usage example with argument unpacking
kwargs: SetSMSAttributesInputTypeDef = { # (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 session.client("sns").set_subscription_attributes method.
boto3 documentation
# set_subscription_attributes method definition
await def set_subscription_attributes(
self,
*,
SubscriptionArn: str,
AttributeName: str,
AttributeValue: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# set_subscription_attributes method usage example with argument unpacking
kwargs: SetSubscriptionAttributesInputTypeDef = { # (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 session.client("sns").set_topic_attributes method.
boto3 documentation
# set_topic_attributes method definition
await def set_topic_attributes(
self,
*,
TopicArn: str,
AttributeName: str,
AttributeValue: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# set_topic_attributes method usage example with argument unpacking
kwargs: SetTopicAttributesInputTypeDef = { # (1)
"TopicArn": ...,
"AttributeName": ...,
}
parent.set_topic_attributes(**kwargs)
subscribe#
Subscribes an endpoint to an Amazon SNS topic.
Type annotations and code completion for session.client("sns").subscribe method.
boto3 documentation
# subscribe method definition
await 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: SubscribeInputTypeDef = { # (1)
"TopicArn": ...,
"Protocol": ...,
}
parent.subscribe(**kwargs)
tag_resource#
Add tags to the specified Amazon SNS topic.
Type annotations and code completion for session.client("sns").tag_resource method.
boto3 documentation
# tag_resource method definition
await def tag_resource(
self,
*,
ResourceArn: str,
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See
Sequence[TagTypeDef]
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestTypeDef = { # (1)
"ResourceArn": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
unsubscribe#
Deletes a subscription.
Type annotations and code completion for session.client("sns").unsubscribe method.
boto3 documentation
# unsubscribe method definition
await def unsubscribe(
self,
*,
SubscriptionArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# unsubscribe method usage example with argument unpacking
kwargs: UnsubscribeInputTypeDef = { # (1)
"SubscriptionArn": ...,
}
parent.unsubscribe(**kwargs)
untag_resource#
Remove tags from the specified Amazon SNS topic.
Type annotations and code completion for session.client("sns").untag_resource method.
boto3 documentation
# untag_resource method definition
await def untag_resource(
self,
*,
ResourceArn: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestTypeDef = { # (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 session.client("sns").verify_sms_sandbox_phone_number method.
boto3 documentation
# verify_sms_sandbox_phone_number method definition
await 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: VerifySMSSandboxPhoneNumberInputTypeDef = { # (1)
"PhoneNumber": ...,
"OneTimePassword": ...,
}
parent.verify_sms_sandbox_phone_number(**kwargs)
__aenter__#
Type annotations and code completion for session.client("sns").__aenter__ method.
boto3 documentation
# __aenter__ method definition
await def __aenter__(
self,
) -> Self:
...
__aexit__#
Type annotations and code completion for session.client("sns").__aexit__ method.
boto3 documentation
# __aexit__ method definition
await def __aexit__(
self,
exc_type: Type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: types.TracebackType | None,
) -> None:
...
get_paginator#
Type annotations and code completion for session.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