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"
]:
if req.options.protocol == "awsJson1_1":
import capo_route_53_domains._operations.route53_domains_v20140515.aws_json1_1.check_domain_transferability
output, http_response = (
capo_route_53_domains._operations.route53_domains_v20140515.aws_json1_1.check_domain_transferability.check_domain_transferability(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_route_53_domains._operations.route53_domains_v20140515.rpcv2_cbor.check_domain_transferability
output, http_response = (
capo_route_53_domains._operations.route53_domains_v20140515.rpcv2_cbor.check_domain_transferability.check_domain_transferability(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
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