listServices method

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

Lists the names and codes for the services integrated with Service Quotas.

May throw AccessDeniedException. May throw IllegalArgumentException. May throw InvalidPaginationTokenException. May throw ServiceException. May throw TooManyRequestsException.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, if any, make another call with the token returned from this call.

Parameter nextToken : The token for the next page of results.

Implementation

Future<ListServicesResponse> listServices({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2048,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ServiceQuotasV20190624.ListServices'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListServicesResponse.fromJson(jsonResponse.body);
}