Accepts the transfer of a domain from another Amazon Web Services account to the currentAmazon Web Services account. You initiate a transfer between Amazon Web Services accounts using TransferDomainToAnotherAwsAccount.
If you use the CLI command at accept-domain-transfer-from-another-aws-account, use JSON format as input instead of text because otherwise CLI will throw an error from domain transfer input that includes single quotes.
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:
Raises:
-
DomainLimitExceeded
–
The number of domains has exceeded the allowed threshold for the account.
-
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/route53_domains.py
| def accept_domain_transfer_from_another_aws_account(
self,
domain_name: "capo_route_53_domains.types.domain_name.DomainName",
password: "capo_route_53_domains.types.password.Password",
*,
config_overrides: Optional[Route53DomainsClientConfig] = None,
) -> "capo_route_53_domains.types.accept_domain_transfer_from_another_aws_account_response.AcceptDomainTransferFromAnotherAwsAccountResponse":
"""<p>Accepts the transfer of a domain from another Amazon Web Services account to the currentAmazon Web Services account. You initiate a transfer between Amazon Web Services accounts using <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html">TransferDomainToAnotherAwsAccount</a>.</p> <p>If you use the CLI command at <a href="https://docs.aws.amazon.com/cli/latest/reference/route53domains/accept-domain-transfer-from-another-aws-account.html">accept-domain-transfer-from-another-aws-account</a>, use JSON format as input instead of text because otherwise CLI will throw an error from domain transfer input that includes single quotes.</p> <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 was specified when another Amazon Web Services account submitted a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html">TransferDomainToAnotherAwsAccount</a> request. </p>
password: <p>The password that was returned by the <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html">TransferDomainToAnotherAwsAccount</a> request. </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.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.
"""
def _handler(
req: "OperationRequest[capo_route_53_domains.types.accept_domain_transfer_from_another_aws_account_request.AcceptDomainTransferFromAnotherAwsAccountRequest]",
) -> OperationResponse[
"capo_route_53_domains.types.accept_domain_transfer_from_another_aws_account_response.AcceptDomainTransferFromAnotherAwsAccountResponse"
]:
import capo_route_53_domains._operations.route53_domains_v20140515.accept_domain_transfer_from_another_aws_account
output, http_response = (
capo_route_53_domains._operations.route53_domains_v20140515.accept_domain_transfer_from_another_aws_account.accept_domain_transfer_from_another_aws_account(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_route_53_domains.types.accept_domain_transfer_from_another_aws_account_request.AcceptDomainTransferFromAnotherAwsAccountRequest",
) -> dict[str, Any]:
import capo_route_53_domains.types.accept_domain_transfer_from_another_aws_account_request
return capo_route_53_domains.types.accept_domain_transfer_from_another_aws_account_request.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"AcceptDomainTransferFromAnotherAwsAccount", redact_input=_redact_input
),
)
input_: capo_route_53_domains.types.accept_domain_transfer_from_another_aws_account_request.AcceptDomainTransferFromAnotherAwsAccountRequest = {
"domain_name": domain_name,
"password": password,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|