listSubscriptions method

Future<ListSubscriptionsOutput> listSubscriptions({
  1. required String domainId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists all Subscriptions within a Domain.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainId : The unique identifier of the parent Domain.

Parameter maxResults : Maximum number of results to return.

Parameter nextToken : Token for pagination.

Implementation

Future<ListSubscriptionsOutput> listSubscriptions({
  required String domainId,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/domains/${Uri.encodeComponent(domainId)}/subscriptions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSubscriptionsOutput.fromJson(response);
}