listDomainConflicts method

Future<ListDomainConflictsResult> listDomainConflicts({
  1. required String domain,
  2. required DistributionResourceId domainControlValidationResource,
  3. String? marker,
  4. int? maxItems,
})
Lists existing domain associations that conflict with the domain that you specify.

You can use this API operation to identify potential domain conflicts when moving domains between standard distributions and/or distribution tenants. Domain conflicts must be resolved first before they can be moved.

For example, if you provide www.example.com as input, the returned list can include www.example.com and the overlapping wildcard alternate domain name (.example.com), if they exist. If you provide .example.com as input, the returned list can include *.example.com and any alternate domain names covered by that wildcard (for example, www.example.com, test.example.com, dev.example.com, and so on), if they exist.

To list conflicting domains, specify the following:

  • The domain to search for
  • The ID of a standard distribution or distribution tenant in your account that has an attached TLS certificate, which covers the specified domain
For more information, including how to set up the standard distribution or distribution tenant, and the certificate, see Moving an alternate domain name to a different standard distribution or distribution tenant in the Amazon CloudFront Developer Guide.

You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request.

May throw AccessDenied. May throw EntityNotFound. May throw InvalidArgument.

Parameter domain : The domain to check for conflicts.

Parameter domainControlValidationResource : The distribution resource identifier. This can be the standard distribution or distribution tenant that has a valid certificate, which covers the domain that you specify.

Parameter marker : The marker for the next set of domain conflicts.

Parameter maxItems : The maximum number of domain conflicts to return.

Implementation

Future<ListDomainConflictsResult> listDomainConflicts({
  required String domain,
  required DistributionResourceId domainControlValidationResource,
  String? marker,
  int? maxItems,
}) async {
  final $result = await _protocol.send(
    method: 'POST',
    requestUri: '/2020-05-31/domain-conflicts',
    payload: ListDomainConflictsRequest(
            domain: domain,
            domainControlValidationResource: domainControlValidationResource,
            marker: marker,
            maxItems: maxItems)
        .toXml('ListDomainConflictsRequest'),
    exceptionFnMap: _exceptionFns,
  );
  return ListDomainConflictsResult.fromXml($result.body);
}