listServices method

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

List a list of registered service on the account level.

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

Parameter filterServiceType : Optional filter to list only services of a specific type.

Parameter maxResults : Maximum number of results to return in a single call.

Parameter nextToken : Token for the next page of results.

Implementation

Future<ListServicesOutput> listServices({
  Service? filterServiceType,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (filterServiceType != null)
      'filterServiceType': [filterServiceType.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri: '/v1/services/list',
    queryParams: $query,
    hostPrefix: 'cp.',
    exceptionFnMap: _exceptionFns,
  );
  return ListServicesOutput.fromJson(response);
}