listDomains method

Future<ListDomainsResponse> listDomains({
  1. int? maxResults,
  2. String? nextToken,
})

Returns a paginated list of domains from the Control Catalog.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter maxResults : The maximum number of results on a page or for an API request call.

Parameter nextToken : The pagination token that's used to fetch the next set of results.

Implementation

Future<ListDomainsResponse> listDomains({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri: '/domains',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDomainsResponse.fromJson(response);
}