listDomains method
Lists the domains.
Parameter maxResults
:
Returns a list up to a specified limit.
Parameter nextToken
:
If the previous response was truncated, you will receive this token. Use
it in your next request to receive the next set of results.
Implementation
Future<ListDomainsResponse> listDomains({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
8192,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.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);
}