Skip to content

check_domain_transferability

check_domain_transferability(
    domain_name: DomainName,
    *,
    config_overrides: Optional[Route53DomainsClientConfig] = None,
    auth_code: Optional[DomainAuthCode] = None,
) -> CheckDomainTransferabilityResponse

Checks whether a domain name can be transferred to Amazon Route 53.

Parameters:

  • domain_name (DomainName) –

    The name of the domain that you want to transfer to Route 53. The top-level domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list of supported TLDs, see Domains that You Can Register with Amazon Route 53 in the Amazon Route 53 Developer Guide.

    The domain name can contain only the following characters:

    • Letters a through z. Domain names are not case sensitive.

    • Numbers 0 through 9.

    • Hyphen (-). You can't specify a hyphen at the beginning or end of a label.

    • Period (.) to separate the labels in the name, such as the . in example.com.

  • auth_code (Optional[DomainAuthCode], default: None ) –

    If the registrar for the top-level domain (TLD) requires an authorization code to transfer the domain, the code that you got from the current registrar for the domain.

Raises:

  • InvalidInput –

    The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, the password might be invalid.

  • TLDInMaintenance –

    The top-level domain is currently undergoing maintenance and the request cannot be processed. Try again later.

  • UnsupportedTLD –

    Amazon Route 53 does not support this top-level domain (TLD).

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route_53_domains/_services/route53_domains.py
def check_domain_transferability(
    self,
    domain_name: "capo_route_53_domains.types.domain_name.DomainName",
    *,
    config_overrides: Optional[Route53DomainsClientConfig] = None,
    auth_code: Optional[
        "capo_route_53_domains.types.domain_auth_code.DomainAuthCode"
    ] = None,
) -> "capo_route_53_domains.types.check_domain_transferability_response.CheckDomainTransferabilityResponse":
    """<p>Checks whether a domain name can be transferred to Amazon Route 53. </p>

    Args:
        domain_name: <p>The name of the domain that you want to transfer to Route 53. The top-level domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list of supported TLDs, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html">Domains that You Can Register with Amazon Route 53</a> in the <i>Amazon Route 53 Developer Guide</i>.</p> <p>The domain name can contain only the following characters:</p> <ul> <li> <p>Letters a through z. Domain names are not case sensitive.</p> </li> <li> <p>Numbers 0 through 9.</p> </li> <li> <p>Hyphen (-). You can't specify a hyphen at the beginning or end of a label. </p> </li> <li> <p>Period (.) to separate the labels in the name, such as the <code>.</code> in <code>example.com</code>.</p> </li> </ul>
        auth_code: <p>If the registrar for the top-level domain (TLD) requires an authorization code to transfer the domain, the code that you got from the current registrar for the domain.</p>

    Raises:
        capo_route_53_domains.errors.invalid_input.InvalidInput: <p>The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For <code>AcceptDomainTransferFromAnotherAwsAccount</code>, the password might be invalid.</p>
        capo_route_53_domains.errors.tld_in_maintenance.TLDInMaintenance: <p>The top-level domain is currently undergoing maintenance and the request cannot be processed. Try again later.</p>
        capo_route_53_domains.errors.unsupported_tld.UnsupportedTLD: <p>Amazon Route 53 does not support this top-level domain (TLD).</p>
        capo_route_53_domains.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route_53_domains.types.check_domain_transferability_request.CheckDomainTransferabilityRequest]",
    ) -> OperationResponse[
        "capo_route_53_domains.types.check_domain_transferability_response.CheckDomainTransferabilityResponse"
    ]:
        import capo_route_53_domains._operations.route53_domains_v20140515.check_domain_transferability

        output, http_response = (
            capo_route_53_domains._operations.route53_domains_v20140515.check_domain_transferability.check_domain_transferability(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_route_53_domains.types.check_domain_transferability_request.CheckDomainTransferabilityRequest",
    ) -> dict[str, Any]:
        import capo_route_53_domains.types.check_domain_transferability_request

        return capo_route_53_domains.types.check_domain_transferability_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CheckDomainTransferability", redact_input=_redact_input),
    )
    input_: capo_route_53_domains.types.check_domain_transferability_request.CheckDomainTransferabilityRequest = {
        "domain_name": domain_name
    }
    if auth_code is not None:
        input_["auth_code"] = auth_code

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