SNSServiceResource#
Auto-generated documentation for SNS type annotations stubs module mypy-boto3-sns.
SNSServiceResource#
Type annotations and code completion for boto3.resource("sns")
, included resources and collections.
boto3 documentation
# SNSServiceResource usage example
from mypy_boto3_sns.service_resource import SNSServiceResource
def get_sns_resource() -> SNSServiceResource:
return boto3.resource("sns")
Attributes#
-
meta
: SNSResourceMeta -
platform_applications
: ServiceResourcePlatformApplicationsCollection -
subscriptions
: ServiceResourceSubscriptionsCollection -
topics
: ServiceResourceTopicsCollection
Collections#
ServiceResourcePlatformApplicationsCollection#
Provides access to PlatformApplication resource.
Type annotations and code completion for boto3.resource("sns").platform_applications
collection.
boto3 documentation
# ServiceResourcePlatformApplicationsCollection usage example
from mypy_boto3_sns.service_resource import ServiceResourcePlatformApplicationsCollection
def get_collection() -> ServiceResourcePlatformApplicationsCollection:
return boto3.resource("sns").platform_applications
ServiceResourceSubscriptionsCollection#
Provides access to Subscription resource.
Type annotations and code completion for boto3.resource("sns").subscriptions
collection.
boto3 documentation
# ServiceResourceSubscriptionsCollection usage example
from mypy_boto3_sns.service_resource import ServiceResourceSubscriptionsCollection
def get_collection() -> ServiceResourceSubscriptionsCollection:
return boto3.resource("sns").subscriptions
ServiceResourceTopicsCollection#
Provides access to Topic resource.
Type annotations and code completion for boto3.resource("sns").topics
collection.
boto3 documentation
# ServiceResourceTopicsCollection usage example
from mypy_boto3_sns.service_resource import ServiceResourceTopicsCollection
def get_collection() -> ServiceResourceTopicsCollection:
return boto3.resource("sns").topics
Methods#
SNSServiceResource.PlatformApplication method#
Creates a PlatformApplication resource.
Type annotations and code completion for boto3.resource("sns").PlatformApplication
method.
boto3 documentation
# PlatformApplication method definition
def PlatformApplication(
self,
arn: str,
) -> PlatformApplication:
...
SNSServiceResource.PlatformEndpoint method#
Creates a PlatformEndpoint resource.
Type annotations and code completion for boto3.resource("sns").PlatformEndpoint
method.
boto3 documentation
# PlatformEndpoint method definition
def PlatformEndpoint(
self,
arn: str,
) -> PlatformEndpoint:
...
SNSServiceResource.Subscription method#
Creates a Subscription resource.
Type annotations and code completion for boto3.resource("sns").Subscription
method.
boto3 documentation
# Subscription method definition
def Subscription(
self,
arn: str,
) -> Subscription:
...
SNSServiceResource.Topic method#
Creates a Topic resource.
Type annotations and code completion for boto3.resource("sns").Topic
method.
boto3 documentation
# Topic method definition
def Topic(
self,
arn: str,
) -> Topic:
...
SNSServiceResource.create_platform_application method#
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.resource("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],
) -> PlatformApplication:
...
# create_platform_application method usage example with argument unpacking
kwargs: CreatePlatformApplicationInputServiceResourceCreatePlatformApplicationTypeDef = { # (1)
"Name": ...,
"Platform": ...,
"Attributes": ...,
}
parent.create_platform_application(**kwargs)
SNSServiceResource.create_topic method#
Creates a topic to which notifications can be published.
Type annotations and code completion for boto3.resource("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 = ...,
) -> Topic:
...
- See TagTypeDef
# create_topic method usage example with argument unpacking
kwargs: CreateTopicInputServiceResourceCreateTopicTypeDef = { # (1)
"Name": ...,
}
parent.create_topic(**kwargs)
SNSServiceResource.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for boto3.resource("sns").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
PlatformApplication#
Type annotations and code completion for boto3.resource("sns").PlatformApplication
class.
boto3 documentation
# PlatformApplication usage example
from mypy_boto3_sns.service_resource import PlatformApplication
def get_resource() -> PlatformApplication:
return boto3.resource("sns").PlatformApplication(...)
PlatformApplication attributes#
attributes
:Dict
[str
,str
]arn
:str
endpoints
: PlatformApplicationEndpointsCollection
PlatformApplication collections#
PlatformApplication.endpoints#
Provides access to PlatformEndpoint resource.
Type annotations and code completion for boto3.resource("sns").PlatformApplication(...).endpoints
collection.
boto3 documentation
# PlatformApplicationEndpointsCollection usage example
from mypy_boto3_sns.service_resource import PlatformApplicationEndpointsCollection
def get_collection() -> PlatformApplicationEndpointsCollection:
resource = boto3.resource("sns").PlatformApplication(...)
return resource.endpoints
PlatformApplication methods#
PlatformApplication.create_platform_endpoint method#
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.resource("sns").create_platform_endpoint
method.
boto3 documentation
# create_platform_endpoint method definition
def create_platform_endpoint(
self,
*,
Token: str,
CustomUserData: str = ...,
Attributes: Mapping[str, str] = ...,
) -> PlatformEndpoint:
...
# create_platform_endpoint method usage example with argument unpacking
kwargs: CreatePlatformEndpointInputPlatformApplicationCreatePlatformEndpointTypeDef = { # (1)
"Token": ...,
}
parent.create_platform_endpoint(**kwargs)
PlatformApplication.delete method#
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.resource("sns").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
) -> None:
...
PlatformApplication.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for boto3.resource("sns").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
PlatformApplication.load method#
Calls meth:
SNS.Client.get_platform_application_attributes
to update the
attributes of the PlatformApplication
resource.
Type annotations and code completion for boto3.resource("sns").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
PlatformApplication.reload method#
Calls meth:
SNS.Client.get_platform_application_attributes
to update the
attributes of the PlatformApplication
resource.
Type annotations and code completion for boto3.resource("sns").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
PlatformApplication.set_attributes method#
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.resource("sns").set_attributes
method.