SNS¶
Client¶
AsyncSNSClient
¶
AsyncSNSClient(config: AsyncSNSConfig | None = None, plugins: list[Plugin] | None = None)
Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see the Amazon SNS product page. For detailed information about Amazon SNS features and their associated API calls, see the Amazon SNS Developer Guide.
For information on the permissions you need to use this API, see Identity and access management in Amazon SNS in the Amazon SNS Developer Guide.
We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to Tools for Amazon Web Services.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
AsyncSNSConfig | None
|
Optional configuration for the client. Here you can set things like the endpoint for HTTP services or auth credentials. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables applied once to the client's base configuration. Their changes are inherited by every operation invocation. |
None
|
Operations¶
add_permissioncheck_if_phone_number_is_opted_outconfirm_subscriptioncreate_platform_applicationcreate_platform_endpointcreate_sms_sandbox_phone_numbercreate_topicdelete_endpointdelete_platform_applicationdelete_sms_sandbox_phone_numberdelete_topicget_data_protection_policyget_endpoint_attributesget_platform_application_attributesget_sms_attributesget_sms_sandbox_account_statusget_subscription_attributesget_topic_attributeslist_endpoints_by_platform_applicationlist_origination_numberslist_phone_numbers_opted_outlist_platform_applicationslist_sms_sandbox_phone_numberslist_subscriptionslist_subscriptions_by_topiclist_tags_for_resourcelist_topicsopt_in_phone_numberpublishpublish_batchput_data_protection_policyremove_permissionset_endpoint_attributesset_platform_application_attributesset_sms_attributesset_subscription_attributesset_topic_attributessubscribetag_resourceunsubscribeuntag_resourceverify_sms_sandbox_phone_number
Configuration¶
AsyncSNSConfig
dataclass
¶
Bases: AsyncAwsConfig
SNS configuration (async-resolved).
Attributes¶
auth_scheme_resolver
class-attribute
instance-attribute
¶
An auth scheme resolver that determines the auth scheme for each operation.
auth_schemes
class-attribute
instance-attribute
¶
A map of auth scheme ids to auth schemes.
aws_access_key_id
class-attribute
instance-attribute
¶
aws_access_key_id: str | None = None
The identifier for a secret access key.
aws_credentials_identity_resolver
class-attribute
instance-attribute
¶
aws_credentials_identity_resolver: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties] | None = None
Resolves AWS Credentials. Required for operations that use Sigv4 Auth.
aws_secret_access_key
class-attribute
instance-attribute
¶
aws_secret_access_key: str | None = None
A secret access key that can be used to sign requests.
aws_session_token
class-attribute
instance-attribute
¶
aws_session_token: str | None = None
The session token used with temporary AWS credentials.
endpoint_resolver
class-attribute
instance-attribute
¶
The endpoint resolver used to resolve the final endpoint per-operation based on the configuration.
interceptors
class-attribute
instance-attribute
¶
The list of interceptors, which are hooks that are called during the execution of a request.
protocol
class-attribute
instance-attribute
¶
The protocol to serialize and deserialize requests with.
region
class-attribute
instance-attribute
¶
region: str | None = None
The AWS region to connect to. The configured region is used to determine the service endpoint.
sdk_ua_app_id
class-attribute
instance-attribute
¶
sdk_ua_app_id: str | None = None
A unique and opaque application ID that is appended to the User-Agent header.
user_agent_extra
class-attribute
instance-attribute
¶
user_agent_extra: str | None = None
Additional suffix to be added to the User-Agent header.
Methods:¶
resolve
async
classmethod
¶
resolve(*, profile: str | None = None, fs: FileSystem | None = None, config_file_path: str | None = None, credentials_file_path: str | None = None, **overrides: Unpack[_AsyncSNSConfigOverrides]) -> Self
Resolve config from environment, config files, defaults, and explicit overrides.
Plugin
module-attribute
¶
Plugin: TypeAlias = Callable[[AsyncSNSConfig], None]
A callable that customizes a client configuration. Service-level plugins are applied once to the base configuration inherited by every operation. Operation-level plugins apply only to a single operation invocation.
Structures¶
BatchResultErrorEntryEndpointMessageAttributeValuePhoneNumberInformationPlatformApplicationPublishBatchRequestEntryPublishBatchResultEntrySMSSandboxPhoneNumberSubscriptionTagTopic
Errors¶
AuthorizationErrorExceptionBatchEntryIdsNotDistinctExceptionBatchRequestTooLongExceptionConcurrentAccessExceptionEmptyBatchRequestExceptionEndpointDisabledExceptionFilterPolicyLimitExceededExceptionInternalErrorExceptionInvalidBatchEntryIdExceptionInvalidParameterExceptionInvalidParameterValueExceptionInvalidSecurityExceptionInvalidStateExceptionKMSAccessDeniedExceptionKMSDisabledExceptionKMSInvalidStateExceptionKMSNotFoundExceptionKMSOptInRequiredKMSThrottlingExceptionNotFoundExceptionOptedOutExceptionPlatformApplicationDisabledExceptionReplayLimitExceededExceptionResourceNotFoundExceptionServiceErrorStaleTagExceptionSubscriptionLimitExceededExceptionTagLimitExceededExceptionTagPolicyExceptionThrottledExceptionTooManyEntriesInBatchRequestExceptionTopicLimitExceededExceptionUserErrorExceptionValidationExceptionVerificationException