listDomains method

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

This operation returns all the domain names registered with Amazon Route 53 for the current AWS account.

May throw InvalidInput.

Parameter marker : For an initial request for a list of domains, omit this element. If the number of domains that are associated with the current AWS account is greater than the value that you specified for MaxItems, you can use Marker to return additional domains. Get the value of NextPageMarker from the previous response, and submit another request that includes the value of NextPageMarker in the Marker element.

Constraints: The marker must match the value specified in the previous request.

Parameter maxItems : Number of domains to be returned.

Default: 20

Implementation

Future<ListDomainsResponse> listDomains({
  String? marker,
  int? maxItems,
}) async {
  _s.validateStringLength(
    'marker',
    marker,
    0,
    4096,
  );
  _s.validateNumRange(
    'maxItems',
    maxItems,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Domains_v20140515.ListDomains'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (marker != null) 'Marker': marker,
      if (maxItems != null) 'MaxItems': maxItems,
    },
  );

  return ListDomainsResponse.fromJson(jsonResponse.body);
}