Skip to content

transfer_domain async

transfer_domain(
    domain_name: DomainName,
    admin_contact: ContactDetail,
    registrant_contact: ContactDetail,
    tech_contact: ContactDetail,
    *,
    config_overrides: Optional[AsyncRoute53DomainsClientConfig] = None,
    idn_lang_code: Optional[LangCode] = None,
    duration_in_years: Optional[DurationInYears] = None,
    nameservers: Optional[NameserverList] = None,
    auth_code: Optional[DomainAuthCode] = None,
    auto_renew: Optional[Boolean] = None,
    privacy_protect_admin_contact: Optional[Boolean] = None,
    privacy_protect_registrant_contact: Optional[Boolean] = None,
    privacy_protect_tech_contact: Optional[Boolean] = None,
    billing_contact: Optional[ContactDetail] = None,
    privacy_protect_billing_contact: Optional[Boolean] = None,
    consent: Optional[Consent] = None,
) -> TransferDomainResponse

Transfers a domain from another registrar to Amazon Route 53.

For more information about transferring domains, see the following topics:

During the transfer of any country code top-level domains (ccTLDs) to Route 53, except for .cc and .tv, updates to the owner contact are ignored and the owner contact data from the registry is used. You can update the owner contact after the transfer is complete. For more information, see UpdateDomainContact.

If the registrar for your domain is also the DNS service provider for the domain, we highly recommend that you transfer your DNS service to Route 53 or to another DNS service provider before you transfer your registration. Some registrars provide free DNS service when you purchase a domain registration. When you transfer the registration, the previous registrar will not renew your domain registration and could end your DNS service at any time.

If the registrar for your domain is also the DNS service provider for the domain and you don't transfer DNS service to another provider, your website, email, and the web applications associated with the domain might become unavailable.

If the transfer is successful, this method returns an operation ID that you can use to track the progress and completion of the action. If the transfer doesn't complete successfully, the domain registrant will be notified by email.

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.

  • idn_lang_code (Optional[LangCode], default: None ) –

    Reserved for future use.

  • duration_in_years (Optional[DurationInYears], default: None ) –

    Reserved for future use.

    Currently, the effect of a domain transfer on the registration period varies by TLD. For information about how transferring a domain affects the expiration date, see the Transfer Term column in the pricing information at Amazon Route 53 Pricing.

    Default: 1

  • nameservers (Optional[NameserverList], default: None ) –

    Contains details for the host and glue IP addresses.

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

    The authorization code for the domain. You get this value from the current registrar.

  • auto_renew (Optional[Boolean], default: None ) –

    Indicates whether the domain will be automatically renewed (true) or not (false). Auto renewal only takes effect after the account is charged.

    Default: true

  • admin_contact (ContactDetail) –

    Provides detailed contact information.

  • registrant_contact (ContactDetail) –

    Provides detailed contact information.

  • tech_contact (ContactDetail) –

    Provides detailed contact information.

  • privacy_protect_admin_contact (Optional[Boolean], default: None ) –

    Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries return contact information for the registrar, the phrase "REDACTED FOR PRIVACY", or "On behalf of owner.".

    While some domains may allow different privacy settings per contact, we recommend specifying the same privacy setting for all contacts.

    Default: true

  • privacy_protect_registrant_contact (Optional[Boolean], default: None ) –

    Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify false, WHOIS queries return the information that you entered for the registrant contact (domain owner).

    You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.

    Default: true

  • privacy_protect_tech_contact (Optional[Boolean], default: None ) –

    Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify false, WHOIS queries return the information that you entered for the technical contact.

    You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.

    Default: true

  • billing_contact (Optional[ContactDetail], default: None ) –

    Provides detailed contact information.

  • privacy_protect_billing_contact (Optional[Boolean], default: None ) –

    Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify false, WHOIS queries return the information that you entered for the billing contact.

    You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.

  • consent (Optional[Consent], default: None ) –

    Specifies the maximum price that you agree to pay to transfer the domain name to Route 53. This element is required if the domain has registry premium pricing, and optional if the domain is priced at the standard rate for its TLD. If you include it and the transfer price is more than MaxPrice, the request fails.

Raises:

  • DomainLimitExceeded –

    The number of domains has exceeded the allowed threshold for the account.

  • DuplicateRequest –

    The request is already in progress for the domain.

  • 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.

  • OperationLimitExceeded –

    The number of operations or jobs running exceeded the allowed threshold for the account.

  • TLDRulesViolation –

    The top-level domain does not support this operation.

  • 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/async_route53_domains.py
async def transfer_domain(
    self,
    domain_name: "capo_route_53_domains.types.domain_name.DomainName",
    admin_contact: "capo_route_53_domains.types.contact_detail.ContactDetail",
    registrant_contact: "capo_route_53_domains.types.contact_detail.ContactDetail",
    tech_contact: "capo_route_53_domains.types.contact_detail.ContactDetail",
    *,
    config_overrides: Optional[AsyncRoute53DomainsClientConfig] = None,
    idn_lang_code: Optional[
        "capo_route_53_domains.types.lang_code.LangCode"
    ] = None,
    duration_in_years: Optional[
        "capo_route_53_domains.types.duration_in_years.DurationInYears"
    ] = None,
    nameservers: Optional[
        "capo_route_53_domains.types.nameserver_list.NameserverList"
    ] = None,
    auth_code: Optional[
        "capo_route_53_domains.types.domain_auth_code.DomainAuthCode"
    ] = None,
    auto_renew: Optional["capo_route_53_domains.types.boolean.Boolean"] = None,
    privacy_protect_admin_contact: Optional[
        "capo_route_53_domains.types.boolean.Boolean"
    ] = None,
    privacy_protect_registrant_contact: Optional[
        "capo_route_53_domains.types.boolean.Boolean"
    ] = None,
    privacy_protect_tech_contact: Optional[
        "capo_route_53_domains.types.boolean.Boolean"
    ] = None,
    billing_contact: Optional[
        "capo_route_53_domains.types.contact_detail.ContactDetail"
    ] = None,
    privacy_protect_billing_contact: Optional[
        "capo_route_53_domains.types.boolean.Boolean"
    ] = None,
    consent: Optional["capo_route_53_domains.types.consent.Consent"] = None,
) -> "capo_route_53_domains.types.transfer_domain_response.TransferDomainResponse":
    """<p>Transfers a domain from another registrar to Amazon Route 53. </p> <p>For more information about transferring domains, see the following topics:</p> <ul> <li> <p>For transfer requirements, a detailed procedure, and information about viewing the status of a domain that you're transferring to Route 53, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-to-route-53.html">Transferring Registration for a Domain to Amazon Route 53</a> in the <i>Amazon Route 53 Developer Guide</i>.</p> </li> <li> <p>For information about how to transfer a domain from one Amazon Web Services account to another, see <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html">TransferDomainToAnotherAwsAccount</a>. </p> </li> <li> <p>For information about how to transfer a domain to another domain registrar, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-from-route-53.html">Transferring a Domain from Amazon Route 53 to Another Registrar</a> in the <i>Amazon Route 53 Developer Guide</i>.</p> </li> </ul> <important> <p>During the transfer of any country code top-level domains (ccTLDs) to Route 53, except for .cc and .tv, updates to the owner contact are ignored and the owner contact data from the registry is used. You can update the owner contact after the transfer is complete. For more information, see <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_UpdateDomainContact.html">UpdateDomainContact</a>.</p> </important> <p>If the registrar for your domain is also the DNS service provider for the domain, we highly recommend that you transfer your DNS service to Route 53 or to another DNS service provider before you transfer your registration. Some registrars provide free DNS service when you purchase a domain registration. When you transfer the registration, the previous registrar will not renew your domain registration and could end your DNS service at any time.</p> <important> <p>If the registrar for your domain is also the DNS service provider for the domain and you don't transfer DNS service to another provider, your website, email, and the web applications associated with the domain might become unavailable.</p> </important> <p>If the transfer is successful, this method returns an operation ID that you can use to track the progress and completion of the action. If the transfer doesn't complete successfully, the domain registrant will be notified by email.</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>
        idn_lang_code: <p>Reserved for future use.</p>
        duration_in_years: <p>Reserved for future use.</p> <p>Currently, the effect of a domain transfer on the registration period varies by TLD. For information about how transferring a domain affects the expiration date, see the Transfer Term column in the pricing information at <a href="http://aws.amazon.com/route53/pricing/">Amazon Route 53 Pricing</a>.</p> <p>Default: 1</p>
        nameservers: <p>Contains details for the host and glue IP addresses.</p>
        auth_code: <p>The authorization code for the domain. You get this value from the current registrar.</p>
        auto_renew: <p>Indicates whether the domain will be automatically renewed (true) or not (false). Auto renewal only takes effect after the account is charged.</p> <p>Default: true</p>
        admin_contact: <p>Provides detailed contact information.</p>
        registrant_contact: <p>Provides detailed contact information.</p>
        tech_contact: <p>Provides detailed contact information.</p>
        privacy_protect_admin_contact: <p>Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information for the registrar, the phrase "REDACTED FOR PRIVACY", or "On behalf of <domain name> owner.".</p> <note> <p>While some domains may allow different privacy settings per contact, we recommend specifying the same privacy setting for all contacts.</p> </note> <p>Default: <code>true</code> </p>
        privacy_protect_registrant_contact: <p>Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify <code>false</code>, WHOIS queries return the information that you entered for the registrant contact (domain owner).</p> <note> <p>You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.</p> </note> <p>Default: <code>true</code> </p>
        privacy_protect_tech_contact: <p>Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify <code>false</code>, WHOIS queries return the information that you entered for the technical contact.</p> <note> <p>You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.</p> </note> <p>Default: <code>true</code> </p>
        billing_contact: <p>Provides detailed contact information.</p>
        privacy_protect_billing_contact: <p> Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify <code>false</code>, WHOIS queries return the information that you entered for the billing contact. </p> <note> <p>You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.</p> </note>
        consent: <p>Specifies the maximum price that you agree to pay to transfer the domain name to Route 53. This element is required if the domain has registry premium pricing, and optional if the domain is priced at the standard rate for its TLD. If you include it and the transfer price is more than <code>MaxPrice</code>, the request fails.</p>

    Raises:
        capo_route_53_domains.errors.domain_limit_exceeded.DomainLimitExceeded: <p>The number of domains has exceeded the allowed threshold for the account.</p>
        capo_route_53_domains.errors.duplicate_request.DuplicateRequest: <p>The request is already in progress for the domain.</p>
        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.operation_limit_exceeded.OperationLimitExceeded: <p>The number of operations or jobs running exceeded the allowed threshold for the account.</p>
        capo_route_53_domains.errors.tld_rules_violation.TLDRulesViolation: <p>The top-level domain does not support this operation.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53_domains.types.transfer_domain_request.TransferDomainRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53_domains.types.transfer_domain_response.TransferDomainResponse"
    ]:
        import capo_route_53_domains._operations.route53_domains_v20140515.transfer_domain

        (
            output,
            http_response,
        ) = await capo_route_53_domains._operations.route53_domains_v20140515.transfer_domain.async_transfer_domain(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_route_53_domains.types.transfer_domain_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("TransferDomain", redact_input=_redact_input),
    )
    input_: capo_route_53_domains.types.transfer_domain_request.TransferDomainRequest = {
        "domain_name": domain_name,
        "admin_contact": admin_contact,
        "registrant_contact": registrant_contact,
        "tech_contact": tech_contact,
    }
    if idn_lang_code is not None:
        input_["idn_lang_code"] = idn_lang_code
    if duration_in_years is not None:
        input_["duration_in_years"] = duration_in_years
    if nameservers is not None:
        input_["nameservers"] = nameservers
    if auth_code is not None:
        input_["auth_code"] = auth_code
    if auto_renew is not None:
        input_["auto_renew"] = auto_renew
    if privacy_protect_admin_contact is not None:
        input_["privacy_protect_admin_contact"] = privacy_protect_admin_contact
    if privacy_protect_registrant_contact is not None:
        input_["privacy_protect_registrant_contact"] = (
            privacy_protect_registrant_contact
        )
    if privacy_protect_tech_contact is not None:
        input_["privacy_protect_tech_contact"] = privacy_protect_tech_contact
    if billing_contact is not None:
        input_["billing_contact"] = billing_contact
    if privacy_protect_billing_contact is not None:
        input_["privacy_protect_billing_contact"] = privacy_protect_billing_contact
    if consent is not None:
        input_["consent"] = consent

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output