Use CheckDomainTransferability
with an AWS SDK or CLI
The following code examples show how to use CheckDomainTransferability
.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:
- .NET
-
- AWS SDK for .NET
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. /// <summary> /// Check the transferability of a domain name. /// </summary> /// <param name="domain">The domain to check for transferability.</param> /// <returns>A transferability result string.</returns> public async Task<string> CheckDomainTransferability(string domain) { var result = await _amazonRoute53Domains.CheckDomainTransferabilityAsync( new CheckDomainTransferabilityRequest { DomainName = domain } ); return result.Transferability.Transferable.Value; }
-
For API details, see CheckDomainTransferability in AWS SDK for .NET API Reference.
-
- CLI
-
- AWS CLI
-
To determine whether a domain can be transferred to Route 53
The following
check-domain-transferability
command returns information about whether you can transfer the domain nameexample.com
to Route 53.This command runs only in the
us-east-1
Region. If your default region is set tous-east-1
, you can omit theregion
parameter.aws route53domains check-domain-transferability \ --region
us-east-1
\ --domain-nameexample.com
Output:
{ "Transferability": { "Transferable": "UNTRANSFERABLE" } }
For more information, see Transferring Registration for a Domain to Amazon Route 53 in the Amazon Route 53 Developer Guide.
-
For API details, see CheckDomainTransferability
in AWS CLI Command Reference.
-
- Java
-
- SDK for Java 2.x
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. public static void checkDomainTransferability(Route53DomainsClient route53DomainsClient, String domainSuggestion) { try { CheckDomainTransferabilityRequest transferabilityRequest = CheckDomainTransferabilityRequest.builder() .domainName(domainSuggestion) .build(); CheckDomainTransferabilityResponse response = route53DomainsClient .checkDomainTransferability(transferabilityRequest); System.out.println("Transferability: " + response.transferability().transferable().toString()); } catch (Route53Exception e) { System.err.println(e.getMessage()); System.exit(1); } }
-
For API details, see CheckDomainTransferability in AWS SDK for Java 2.x API Reference.
-
- Kotlin
-
- SDK for Kotlin
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. suspend fun checkDomainTransferability(domainSuggestion: String?) { val transferabilityRequest = CheckDomainTransferabilityRequest { domainName = domainSuggestion } Route53DomainsClient { region = "us-east-1" }.use { route53DomainsClient -> val response = route53DomainsClient.checkDomainTransferability(transferabilityRequest) println("Transferability: ${response.transferability?.transferable}") } }
-
For API details, see CheckDomainTransferability
in AWS SDK for Kotlin API reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using Route 53 with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.