Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a NextToken is also returned. Use the NextToken parameter in a new ListTopics call to get further results.
This action is throttled at 30 transactions per second (TPS).
Parameters:
-
next_token
(Optional[nextToken], default:
None
)
–
Token returned by the previous ListTopics request.
Raises:
Source code in docs_src/capo_sns/_services/sns.py
| def list_topics(
self,
*,
config_overrides: Optional[SNSClientConfig] = None,
next_token: Optional["capo_sns.types.next_token.nextToken"] = None,
) -> "capo_sns.types.list_topics_response.ListTopicsResponse":
"""<p>Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListTopics</code> call to get further results.</p> <p>This action is throttled at 30 transactions per second (TPS).</p>
Args:
next_token: <p>Token returned by the previous <code>ListTopics</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.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_sns.types.list_topics_input.ListTopicsInput]",
) -> OperationResponse[
"capo_sns.types.list_topics_response.ListTopicsResponse"
]:
import capo_sns._operations.amazon_simple_notification_service.list_topics
output, http_response = (
capo_sns._operations.amazon_simple_notification_service.list_topics.list_topics(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListTopics")
)
input_: capo_sns.types.list_topics_input.ListTopicsInput = {}
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
|