listDomains method
Lists all the domains in the Amazon Web Services account.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results that are returned per call. You can use
NextToken to obtain more pages of results. The default is
100; the maximum allowed page size is also 100.
Parameter nextToken :
If NextToken is returned, there are more results available.
The value of NextToken is a unique pagination token for each
page. Make the call again using the returned token to retrieve the next
page. Keep all other arguments unchanged. Each pagination token expires
after 24 hours.
Implementation
Future<ListDomainsResponse> listDomains({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'VoiceID.ListDomains'
};
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 ListDomainsResponse.fromJson(jsonResponse.body);
}