listOriginationNumbers method

Future<ListOriginationNumbersResult> listOriginationNumbers({
  1. int? maxResults,
  2. String? nextToken,
})

Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata. For more information about origination numbers, see Origination numbers in the Amazon SNS Developer Guide.

May throw AuthorizationErrorException. May throw InternalErrorException. May throw InvalidParameterException. May throw ThrottledException. May throw ValidationException.

Parameter maxResults : The maximum number of origination numbers to return.

Parameter nextToken : Token that the previous ListOriginationNumbers request returns.

Implementation

Future<ListOriginationNumbersResult> listOriginationNumbers({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    30,
  );
  final $request = <String, String>{
    if (maxResults != null) 'MaxResults': maxResults.toString(),
    if (nextToken != null) 'NextToken': nextToken,
  };
  final $result = await _protocol.send(
    $request,
    action: 'ListOriginationNumbers',
    version: '2010-03-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ListOriginationNumbersResult',
  );
  return ListOriginationNumbersResult.fromXml($result);
}