Transfers a domain from the current Amazon Web Services account to another Amazon Web Services account. Note the following:
When you transfer a domain from one Amazon Web Services account to another, Route 53 doesn't transfer the hosted zone that is associated with the domain. DNS resolution isn't affected if the domain and the hosted zone are owned by separate accounts, so transferring the hosted zone is optional. For information about transferring the hosted zone to another Amazon Web Services account, see Migrating a Hosted Zone to a Different Amazon Web Services Account in the Amazon Route 53 Developer Guide.
Use either ListOperations or GetOperationDetail to determine whether the operation succeeded. GetOperationDetail provides additional information, for example, Domain Transfer from Aws Account 111122223333 has been cancelled.
Parameters:
-
domain_name
(DomainName)
–
The name of the domain that you want to transfer from the current Amazon Web Services account to another account.
-
account_id
(AccountId)
–
The account ID of the Amazon Web Services account that you want to transfer the domain to, for example, 111122223333.
Raises:
-
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.
-
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_to_another_aws_account(
self,
domain_name: "capo_route_53_domains.types.domain_name.DomainName",
account_id: "capo_route_53_domains.types.account_id.AccountId",
*,
config_overrides: Optional[AsyncRoute53DomainsClientConfig] = None,
) -> "capo_route_53_domains.types.transfer_domain_to_another_aws_account_response.TransferDomainToAnotherAwsAccountResponse":
"""<p>Transfers a domain from the current Amazon Web Services account to another Amazon Web Services account. Note the following:</p> <ul> <li> <p>The Amazon Web Services account that you're transferring the domain to must accept the transfer. If the other account doesn't accept the transfer within 3 days, we cancel the transfer. See <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html">AcceptDomainTransferFromAnotherAwsAccount</a>. </p> </li> <li> <p>You can cancel the transfer before the other account accepts it. See <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_CancelDomainTransferToAnotherAwsAccount.html">CancelDomainTransferToAnotherAwsAccount</a>. </p> </li> <li> <p>The other account can reject the transfer. See <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_RejectDomainTransferFromAnotherAwsAccount.html">RejectDomainTransferFromAnotherAwsAccount</a>. </p> </li> </ul> <important> <p>When you transfer a domain from one Amazon Web Services account to another, Route 53 doesn't transfer the hosted zone that is associated with the domain. DNS resolution isn't affected if the domain and the hosted zone are owned by separate accounts, so transferring the hosted zone is optional. For information about transferring the hosted zone to another Amazon Web Services account, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html">Migrating a Hosted Zone to a Different Amazon Web Services Account</a> in the <i>Amazon Route 53 Developer Guide</i>.</p> </important> <p>Use either <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html">ListOperations</a> or <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html">GetOperationDetail</a> to determine whether the operation succeeded. <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html">GetOperationDetail</a> provides additional information, for example, <code>Domain Transfer from Aws Account 111122223333 has been cancelled</code>. </p>
Args:
domain_name: <p>The name of the domain that you want to transfer from the current Amazon Web Services account to another account.</p>
account_id: <p>The account ID of the Amazon Web Services account that you want to transfer the domain to, for example, <code>111122223333</code>.</p>
Raises:
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.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_to_another_aws_account_request.TransferDomainToAnotherAwsAccountRequest]",
) -> AsyncOperationResponse[
"capo_route_53_domains.types.transfer_domain_to_another_aws_account_response.TransferDomainToAnotherAwsAccountResponse"
]:
import capo_route_53_domains._operations.route53_domains_v20140515.transfer_domain_to_another_aws_account
(
output,
http_response,
) = await capo_route_53_domains._operations.route53_domains_v20140515.transfer_domain_to_another_aws_account.async_transfer_domain_to_another_aws_account(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_route_53_domains.types.transfer_domain_to_another_aws_account_response.TransferDomainToAnotherAwsAccountResponse",
) -> dict[str, Any]:
import capo_route_53_domains.types.transfer_domain_to_another_aws_account_response
return capo_route_53_domains.types.transfer_domain_to_another_aws_account_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"TransferDomainToAnotherAwsAccount", redact_output=_redact_output
),
)
input_: capo_route_53_domains.types.transfer_domain_to_another_aws_account_request.TransferDomainToAnotherAwsAccountRequest = {
"domain_name": domain_name,
"account_id": account_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|