Skip to content

list_domain_conflicts

list_domain_conflicts(
    domain: string,
    domain_control_validation_resource: DistributionResourceId,
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    max_items: Optional[integer] = None,
    marker: Optional[string] = None,
) -> ListDomainConflictsResult

We recommend that you use the ListDomainConflicts API operation to check for domain conflicts, as it supports both standard distributions and distribution tenants. ListConflictingAliases performs similar checks but only supports standard distributions.

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.

Parameters:

  • domain (string) –

    The domain to check for conflicts.

  • domain_control_validation_resource (DistributionResourceId) –

    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.

  • max_items (Optional[integer], default: None ) –

    The maximum number of domain conflicts to return.

  • marker (Optional[string], default: None ) –

    The marker for the next set of domain conflicts.

Raises:

Source code in docs_src/capo_cloudfront/_services/cloud_front.py
def list_domain_conflicts(
    self,
    domain: "capo_cloudfront.types.string.string",
    domain_control_validation_resource: "capo_cloudfront.types.distribution_resource_id.DistributionResourceId",
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    max_items: Optional["capo_cloudfront.types.integer.integer"] = None,
    marker: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.list_domain_conflicts_result.ListDomainConflictsResult":
    """<note> <p>We recommend that you use the <code>ListDomainConflicts</code> API operation to check for domain conflicts, as it supports both standard distributions and distribution tenants. <a href="https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ListConflictingAliases.html">ListConflictingAliases</a> performs similar checks but only supports standard distributions.</p> </note> <p>Lists existing domain associations that conflict with the domain that you specify.</p> <p>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. </p> <p>For example, if you provide <code>www.example.com</code> as input, the returned list can include <code>www.example.com</code> and the overlapping wildcard alternate domain name (<code>*.example.com</code>), if they exist. If you provide <code>*.example.com</code> as input, the returned list can include <code>*.example.com</code> and any alternate domain names covered by that wildcard (for example, <code>www.example.com</code>, <code>test.example.com</code>, <code>dev.example.com</code>, and so on), if they exist.</p> <p>To list conflicting domains, specify the following:</p> <ul> <li> <p>The domain to search for</p> </li> <li> <p>The ID of a standard distribution or distribution tenant in your account that has an attached TLS certificate, which covers the specified domain</p> </li> </ul> <p>For more information, including how to set up the standard distribution or distribution tenant, and the certificate, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move">Moving an alternate domain name to a different standard distribution or distribution tenant</a> in the <i>Amazon CloudFront Developer Guide</i>.</p> <p>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 <code>NextMarker</code> value from the current response as the <code>Marker</code> value in the subsequent request.</p>

    Args:
        domain: <p>The domain to check for conflicts.</p>
        domain_control_validation_resource: <p>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.</p>
        max_items: <p>The maximum number of domain conflicts to return.</p>
        marker: <p>The marker for the next set of domain conflicts.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
        capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudfront.types.list_domain_conflicts_request.ListDomainConflictsRequest]",
    ) -> OperationResponse[
        "capo_cloudfront.types.list_domain_conflicts_result.ListDomainConflictsResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.list_domain_conflicts

        output, http_response = (
            capo_cloudfront._operations.cloudfront2020_05_31.list_domain_conflicts.list_domain_conflicts(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomainConflicts")
    )
    input_: capo_cloudfront.types.list_domain_conflicts_request.ListDomainConflictsRequest = {
        "domain": domain,
        "domain_control_validation_resource": domain_control_validation_resource,
    }
    if max_items is not None:
        input_["max_items"] = max_items
    if marker is not None:
        input_["marker"] = marker

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output