listServices method

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

List services with summaries of detail data.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter maxResults : The maximum number of services to list.

Parameter nextToken : A token that indicates the location of the next service in the array of services, after the list of services that was previously requested.

Implementation

Future<ListServicesOutput> listServices({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AwsProton20200720.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 ListServicesOutput.fromJson(jsonResponse.body);
}