Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptionsByTopic call to get further results.
This action is throttled at 30 transactions per second (TPS).
Parameters:
-
topic_arn
(topicARN)
–
The ARN of the topic for which you wish to find subscriptions.
-
next_token
(Optional[nextToken], default:
None
)
–
Token returned by the previous ListSubscriptionsByTopic request.
Raises:
Source code in docs_src/capo_sns/_services/async_sns.py
| async def list_subscriptions_by_topic(
self,
topic_arn: "capo_sns.types.topic_arn.topicARN",
*,
config_overrides: Optional[AsyncSNSClientConfig] = None,
next_token: Optional["capo_sns.types.next_token.nextToken"] = None,
) -> "capo_sns.types.list_subscriptions_by_topic_response.ListSubscriptionsByTopicResponse":
"""<p>Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptionsByTopic</code> call to get further results.</p> <p>This action is throttled at 30 transactions per second (TPS).</p>
Args:
topic_arn: <p>The ARN of the topic for which you wish to find subscriptions.</p>
next_token: <p>Token returned by the previous <code>ListSubscriptionsByTopic</code> request.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sns.types.list_subscriptions_by_topic_input.ListSubscriptionsByTopicInput]",
) -> AsyncOperationResponse[
"capo_sns.types.list_subscriptions_by_topic_response.ListSubscriptionsByTopicResponse"
]:
import capo_sns._operations.amazon_simple_notification_service.list_subscriptions_by_topic
(
output,
http_response,
) = await capo_sns._operations.amazon_simple_notification_service.list_subscriptions_by_topic.async_list_subscriptions_by_topic(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListSubscriptionsByTopic")
)
input_: capo_sns.types.list_subscriptions_by_topic_input.ListSubscriptionsByTopicInput = {
"topic_arn": topic_arn
}
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|