listServices method
- List<
ServiceFilter> ? filters, - int? maxResults,
- String? nextToken,
Lists summary information for all the services that are associated with one or more specified 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 AWS Cloud Map to return in
the response to a ListServices
request. If you don't specify
a value for MaxResults
, AWS 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,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
4096,
);
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);
}