listNamespaces method
- List<
NamespaceFilter> ? filters, - int? maxResults,
- String? nextToken,
Lists summary information about the namespaces that were created by the current AWS account.
May throw InvalidInput.
Parameter filters :
A complex type that contains specifications for the namespaces that you
want to list.
If you specify more than one filter, a namespace must match all filters to
be returned by ListNamespaces.
Parameter maxResults :
The maximum number of namespaces that you want AWS Cloud Map to return in
the response to a ListNamespaces request. If you don't
specify a value for MaxResults, AWS Cloud Map returns up to
100 namespaces.
Parameter nextToken :
For the first ListNamespaces request, omit this value.
If the response contains NextToken, submit another
ListNamespaces request to get the next group of results.
Specify the value of NextToken from the previous response in
the next request.
Implementation
Future<ListNamespacesResponse> listNamespaces({
List<NamespaceFilter>? 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.ListNamespaces'
};
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 ListNamespacesResponse.fromJson(jsonResponse.body);
}