listSubscriptionsByTopic method
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).
May throw InvalidParameterException. May throw InternalErrorException. May throw NotFoundException. May throw AuthorizationErrorException.
Parameter topicArn
:
The ARN of the topic for which you wish to find subscriptions.
Parameter nextToken
:
Token returned by the previous ListSubscriptionsByTopic
request.
Implementation
Future<ListSubscriptionsByTopicResponse> listSubscriptionsByTopic({
required String topicArn,
String? nextToken,
}) async {
ArgumentError.checkNotNull(topicArn, 'topicArn');
final $request = <String, dynamic>{};
$request['TopicArn'] = topicArn;
nextToken?.also((arg) => $request['NextToken'] = arg);
final $result = await _protocol.send(
$request,
action: 'ListSubscriptionsByTopic',
version: '2010-03-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['ListSubscriptionsByTopicInput'],
shapes: shapes,
resultWrapper: 'ListSubscriptionsByTopicResult',
);
return ListSubscriptionsByTopicResponse.fromXml($result);
}