listServices method
Lists summary information for all the services that are associated with one or more namespaces.
May throw InvalidInput.
Parameter filters :
A complex type that contains specifications for the namespaces that you
want to list services for.
If you specify more than one filter, an operation must match all filters
to be returned by ListServices.
Parameter maxResults :
The maximum number of services that you want Cloud Map to return in the
response to a ListServices request. If you don't specify a
value for MaxResults, Cloud Map returns up to 100 services.
Parameter nextToken :
For the first ListServices request, omit this value.
If the response contains NextToken, submit another
ListServices request to get the next group of results.
Specify the value of NextToken from the previous response in
the next request.
Implementation
Future<ListServicesResponse> listServices({
List<ServiceFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53AutoNaming_v20170314.ListServices'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListServicesResponse.fromJson(jsonResponse.body);
}