Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS. The results for ListEndpointsByPlatformApplication are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call ListEndpointsByPlatformApplication again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications.
This action is throttled at 30 transactions per second (TPS).
Parameters:
-
platform_application_arn
(String)
–
PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action.
-
next_token
(Optional[String], default:
None
)
–
NextToken string is used when calling ListEndpointsByPlatformApplication action to retrieve additional records that are available after the first page results.
Raises:
Source code in docs_src/capo_sns/_services/sns.py
| def list_endpoints_by_platform_application(
self,
platform_application_arn: "capo_sns.types.string.String",
*,
config_overrides: Optional[SNSClientConfig] = None,
next_token: Optional["capo_sns.types.string.String"] = None,
) -> "capo_sns.types.list_endpoints_by_platform_application_response.ListEndpointsByPlatformApplicationResponse":
"""<p>Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS. The results for <code>ListEndpointsByPlatformApplication</code> are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call <code>ListEndpointsByPlatformApplication</code> again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p> <p>This action is throttled at 30 transactions per second (TPS).</p>
Args:
platform_application_arn: <p> <code>PlatformApplicationArn</code> for <code>ListEndpointsByPlatformApplicationInput</code> action.</p>
next_token: <p> <code>NextToken</code> string is used when calling <code>ListEndpointsByPlatformApplication</code> action to retrieve additional records that are available after the first page results.</p>
Raises:
capo_sns.errors.authorization_error_exception.AuthorizationErrorException: <p>Indicates that the user has been denied access to the requested resource.</p>
capo_sns.errors.internal_error_exception.InternalErrorException: <p>Indicates an internal service error.</p>
capo_sns.errors.invalid_parameter_exception.InvalidParameterException: <p>Indicates that a request parameter does not comply with the associated constraints.</p>
capo_sns.errors.not_found_exception.NotFoundException: <p>Indicates that the requested resource does not exist.</p>
capo_sns.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_sns.types.list_endpoints_by_platform_application_input.ListEndpointsByPlatformApplicationInput]",
) -> OperationResponse[
"capo_sns.types.list_endpoints_by_platform_application_response.ListEndpointsByPlatformApplicationResponse"
]:
import capo_sns._operations.amazon_simple_notification_service.list_endpoints_by_platform_application
output, http_response = (
capo_sns._operations.amazon_simple_notification_service.list_endpoints_by_platform_application.list_endpoints_by_platform_application(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListEndpointsByPlatformApplication")
)
input_: capo_sns.types.list_endpoints_by_platform_application_input.ListEndpointsByPlatformApplicationInput = {
"platform_application_arn": platform_application_arn
}
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|