Route 53 domain registration examples using Amazon CLI
The following code examples show you how to perform actions and implement common scenarios by using the Amazon Command Line Interface with Route 53 domain registration.
Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.
Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.
Topics
Actions
The following code example shows how to use check-domain-availability.
- Amazon CLI
-
To determine whether you can register a domain name with Route 53
The following
check-domain-availabilitycommand returns information about whether the domain nameexample.comis available to be registered using Route 53.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains check-domain-availability \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "Availability": "UNAVAILABLE" }Route 53 supports a large number of top-level domains (TLDs), such as
.comand.jp, but we don't support all available TLDs. If you check the availability of a domain and Route 53 doesn't support the TLD,check-domain-availabilityreturns the following message.An error occurred (UnsupportedTLD) when calling the CheckDomainAvailability operation: <top-level domain> tld is not supported.For a list of the TLDs that you can use when registering a domain with Route 53, see Domains That You Can Register with Amazon Route 53
in the Amazon Route 53 Developer Guide. For more information about registering domains with Amazon Route 53, see Registering a New Domain in the Amazon Route 53 Developer Guide. -
For API details, see CheckDomainAvailability
in Amazon CLI Command Reference.
-
The following code example shows how to use check-domain-transferability.
- Amazon CLI
-
To determine whether a domain can be transferred to Route 53
The following
check-domain-transferabilitycommand returns information about whether you can transfer the domain nameexample.comto Route 53.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains check-domain-transferability \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "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 Amazon CLI Command Reference.
-
The following code example shows how to use delete-tags-for-domain.
- Amazon CLI
-
To delete tags for a domain
The following
delete-tags-for-domaincommand deletes three tags from the specified domain. Note that you specify only the tag key, not the tag value.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains delete-tags-for-domain \ --regionus-east-1\ --domain-nameexample.com\ --tags-to-deleteaccounting-keyhr-keyengineering-keyThis command produces no output.
To confirm that the tags were deleted, you can run list-tags-for-domain
. For more information, see Tagging Amazon Route 53 Resources in the Amazon Route 53 Developer Guide. -
For API details, see DeleteTagsForDomain
in Amazon CLI Command Reference.
-
The following code example shows how to use disable-domain-auto-renew.
- Amazon CLI
-
To disable automatic renewal of a domain
The following
disable-domain-auto-renewcommand configures Route 53 to not automatically renew the domainexample.combefore registration for the domain expires.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains disable-domain-auto-renew \ --regionus-east-1\ --domain-nameexample.comThis command produces no output.
To confirm that the setting was changed, you can run get-domain-detail
. If automatic renewal is disabled, the value of AutoRenewisFalse. For more information about automatic renewal, see Renewing Registration for a Domain <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-renew.html in the Amazon Route 53 Developer Guide.-
For API details, see DisableDomainAutoRenew
in Amazon CLI Command Reference.
-
The following code example shows how to use disable-domain-transfer-lock.
- Amazon CLI
-
To disable the transfer lock on a domain
The following
disable-domain-transfer-lockcommand removes the transfer lock on the domainexample.comso that the domain can be transferred to another registrar. This command changes theclientTransferProhibitedstatus.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains disable-domain-transfer-lock \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "OperationId": "3f28e0ac-126a-4113-9048-cc930example" }To confirm that the transfer lock has been changed, you can run get-domain-detail
. When the transfer lock is disabled, the value of StatusListdoes not includeclientTransferProhibited.For more information about the transfer process, see Transferring a Domain from Amazon Route 53 to Another Registrar
in the Amazon Route 53 Developer Guide. -
For API details, see DisableDomainTransferLock
in Amazon CLI Command Reference.
-
The following code example shows how to use enable-domain-auto-renew.
- Amazon CLI
-
To enable automatic renewal of a domain
The following
enable-domain-auto-renewcommand configures Route 53 to automatically renew the domainexample.combefore registration for the domain expires.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains enable-domain-auto-renew \ --regionus-east-1\ --domain-nameexample.comThis command produces no output. To confirm that the setting was changed, you can run get-domain-detail
. If automatic renewal is enabled, the value of AutoRenewisTrue.For more information about automatic renewal, see Renewing Registration for a Domain <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-renew.html in the Amazon Route 53 Developer Guide.
-
For API details, see EnableDomainAutoRenew
in Amazon CLI Command Reference.
-
The following code example shows how to use enable-domain-transfer-lock.
- Amazon CLI
-
To enable the transfer lock on a domain
The following
enable-domain-transfer-lockcommand locks the specified domain so that it can't be transferred to another registrar. This command changes theclientTransferProhibitedstatus.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains enable-domain-transfer-lock \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "OperationId": "3f28e0ac-126a-4113-9048-cc930example" }To confirm that the transfer lock has been changed, you can run get-domain-detail
. When the transfer lock is enabled, the value of StatusListincludesclientTransferProhibited.For more information about the transfer process, see Transferring a Domain from Amazon Route 53 to Another Registrar
in the Amazon Route 53 Developer Guide. -
For API details, see EnableDomainTransferLock
in Amazon CLI Command Reference.
-
The following code example shows how to use get-contact-reachability-status.
- Amazon CLI
-
To determine whether the registrant contact has responded to a confirmation email
The following
get-contact-reachability-statuscommand returns information about whether the registrant contact for the specified domain has responded to a confirmation email.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains get-contact-reachability-status \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "domainName": "example.com", "status": "DONE" }For more information, see Resending Authorization and Confirmation Emails
in the Amazon Route 53 Developer Guide. -
For API details, see GetContactReachabilityStatus
in Amazon CLI Command Reference.
-
The following code example shows how to use get-domain-detail.
- Amazon CLI
-
To get detailed information about a specified domain
The following
get-domain-detailcommand displays detailed information about the specified domain.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains get-domain-detail \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "DomainName": "example.com", "Nameservers": [ { "Name": "ns-2048.awsdns-64.com", "GlueIps": [] }, { "Name": "ns-2049.awsdns-65.net", "GlueIps": [] }, { "Name": "ns-2050.awsdns-66.org", "GlueIps": [] }, { "Name": "ns-2051.awsdns-67.co.uk", "GlueIps": [] } ], "AutoRenew": true, "AdminContact": { "FirstName": "Saanvi", "LastName": "Sarkar", "ContactType": "COMPANY", "OrganizationName": "Example", "AddressLine1": "123 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "ssarkar@example.com", "ExtraParams": [] }, "RegistrantContact": { "FirstName": "Alejandro", "LastName": "Rosalez", "ContactType": "COMPANY", "OrganizationName": "Example", "AddressLine1": "123 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "arosalez@example.com", "ExtraParams": [] }, "TechContact": { "FirstName": "Wang", "LastName": "Xiulan", "ContactType": "COMPANY", "OrganizationName": "Example", "AddressLine1": "123 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "wxiulan@example.com", "ExtraParams": [] }, "AdminPrivacy": true, "RegistrantPrivacy": true, "TechPrivacy": true, "RegistrarName": "Amazon Registrar, Inc.", "WhoIsServer": "whois.registrar.amazon", "RegistrarUrl": "http://registrar.amazon.com", "AbuseContactEmail": "abuse@registrar.amazon.com", "AbuseContactPhone": "+1.2062661000", "CreationDate": 1444934889.601, "ExpirationDate": 1602787689.0, "StatusList": [ "clientTransferProhibited" ] }-
For API details, see GetDomainDetail
in Amazon CLI Command Reference.
-
The following code example shows how to use get-domain-suggestions.
- Amazon CLI
-
To get a list of suggested domain names
The following
get-domain-suggestionscommand displays a list of suggested domain names based on the domain nameexample.com. The response includes only domain names that are available. This command runs only in theus-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains get-domain-suggestions \ --regionus-east-1\ --domain-nameexample.com\ --suggestion-count10\ --only-availableOutput:
{ "SuggestionsList": [ { "DomainName": "egzaampal.com", "Availability": "AVAILABLE" }, { "DomainName": "examplelaw.com", "Availability": "AVAILABLE" }, { "DomainName": "examplehouse.net", "Availability": "AVAILABLE" }, { "DomainName": "homeexample.net", "Availability": "AVAILABLE" }, { "DomainName": "examplelist.com", "Availability": "AVAILABLE" }, { "DomainName": "examplenews.net", "Availability": "AVAILABLE" }, { "DomainName": "officeexample.com", "Availability": "AVAILABLE" }, { "DomainName": "exampleworld.com", "Availability": "AVAILABLE" }, { "DomainName": "exampleart.com", "Availability": "AVAILABLE" } ] }-
For API details, see GetDomainSuggestions
in Amazon CLI Command Reference.
-
The following code example shows how to use get-operation-detail.
- Amazon CLI
-
To get the current status of an operation
Some domain registration operations operate asynchronously and return a response before they finish. These operations return an operation ID that you can use to get the current status. The following
get-operation-detailcommand returns the status of the specified operation.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains get-operation-detail \ --regionus-east-1\ --operation-idedbd8d63-7fe7-4343-9bc5-54033exampleOutput:
{ "OperationId": "edbd8d63-7fe7-4343-9bc5-54033example", "Status": "SUCCESSFUL", "DomainName": "example.com", "Type": "DOMAIN_LOCK", "SubmittedDate": 1573749367.864 }-
For API details, see GetOperationDetail
in Amazon CLI Command Reference.
-
The following code example shows how to use list-domains.
- Amazon CLI
-
To list the domains that are registered with the current Amazon account
The following
list-domainscommand lists summary information about the domains that are registered with the current Amazon account.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains list-domains --regionus-east-1Output:
{ "Domains": [ { "DomainName": "example.com", "AutoRenew": true, "TransferLock": true, "Expiry": 1602712345.0 }, { "DomainName": "example.net", "AutoRenew": true, "TransferLock": true, "Expiry": 1602723456.0 }, { "DomainName": "example.org", "AutoRenew": true, "TransferLock": true, "Expiry": 1602734567.0 } ] }-
For API details, see ListDomains
in Amazon CLI Command Reference.
-
The following code example shows how to use list-operations.
- Amazon CLI
-
To list the status of operations that return an operation ID
Some domain registration operations run asynchronously and return a response before they finish. These operations return an operation ID that you can use to get the current status. The following
list-operationscommand lists summary information, including the status, about the current domain-registration operations.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains list-operations --regionus-east-1Output:
{ "Operations": [ { "OperationId": "aab9822f-1da0-4bf3-8a15-fd4e0example", "Status": "SUCCESSFUL", "Type": "DOMAIN_LOCK", "SubmittedDate": 1455321739.986 }, { "OperationId": "c24379ed-76be-42f8-bdad-9379bexample", "Status": "SUCCESSFUL", "Type": "UPDATE_NAMESERVER", "SubmittedDate": 1468960475.109 }, { "OperationId": "f47e1297-ef9e-4c2b-ae1e-a5fcbexample", "Status": "SUCCESSFUL", "Type": "RENEW_DOMAIN", "SubmittedDate": 1473561835.943 }, { "OperationId": "75584f23-b15f-459e-aed7-dc6f5example", "Status": "SUCCESSFUL", "Type": "UPDATE_DOMAIN_CONTACT", "SubmittedDate": 1547501003.41 } ] }The output includes all the operations that return an operation ID and that you have performed on all the domains that you have ever registered using the current Amazon account. If you want to get only the operations that you submitted after a specified date, you can include the
submitted-sinceparameter and specify a date in Unix format and Coordinated Universal Time (UTC). The following command gets the status of all operations that were submitted after 12:00 am UTC on January 1, 2020.aws route53domains list-operations \ --submitted-since1577836800-
For API details, see ListOperations
in Amazon CLI Command Reference.
-
The following code example shows how to use list-tags-for-domain.
- Amazon CLI
-
To list tags for a domain
The following
list-tags-for-domaincommand lists the tags that are currently associated with the specified domain.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains list-tags-for-domain \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "TagList": [ { "Key": "key1", "Value": "value1" }, { "Key": "key2", "Value": "value2" } ] }For more information, see Tagging Amazon Route 53 Resources
in the Amazon Route 53 Developer Guide. -
For API details, see ListTagsForDomain
in Amazon CLI Command Reference.
-
The following code example shows how to use register-domain.
- Amazon CLI
-
To register a domain
The following
register-domaincommand registers a domain, retrieving all parameter values from a JSON-formatted file.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains register-domain \ --regionus-east-1\ --cli-input-jsonfile://register-domain.jsonContents of
register-domain.json:{ "DomainName": "example.com", "DurationInYears": 1, "AutoRenew": true, "AdminContact": { "FirstName": "Martha", "LastName": "Rivera", "ContactType": "PERSON", "OrganizationName": "Example", "AddressLine1": "1 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "mrivera@example.com" }, "RegistrantContact": { "FirstName": "Li", "LastName": "Juan", "ContactType": "PERSON", "OrganizationName": "Example", "AddressLine1": "1 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "ljuan@example.com" }, "TechContact": { "FirstName": "Mateo", "LastName": "Jackson", "ContactType": "PERSON", "OrganizationName": "Example", "AddressLine1": "1 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "mjackson@example.com" }, "PrivacyProtectAdminContact": true, "PrivacyProtectRegistrantContact": true, "PrivacyProtectTechContact": true }Output:
{ "OperationId": "b114c44a-9330-47d1-a6e8-a0b11example" }To confirm that the operation succeeded, you can run
get-operation-detail. For more information, see get-operation-detail. For more information, see Registering a New Domain
in the Amazon Route 53 Developer Guide. For information about which top-level domains (TLDs) require values for
ExtraParamsand what the valid values are, see ExtraParamin the Amazon Route 53 API Reference. -
For API details, see RegisterDomain
in Amazon CLI Command Reference.
-
The following code example shows how to use renew-domain.
- Amazon CLI
-
To renew a domain
The following
renew-domaincommand renews the specified domain for five years. To get the value forcurrent-expiry-year, use theget-domain-detailcommand, and convert the value ofExpirationDatefrom Unix format.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains renew-domain \ --regionus-east-1\ --domain-nameexample.com\ --duration-in-years5\ --current-expiry-year2020Output:
{ "OperationId": "3f28e0ac-126a-4113-9048-cc930example" }To confirm that the operation succeeded, you can run
get-operation-detail. For more information, see get-operation-detail. The registry for each top-level domain (TLD), such as .com or .org, controls the maximum number of years that you can renew a domain for. To get the maximum renewal period for your domain, see the "Registration and Renewal Period" section for your TLD in Domains That You Can Register with Amazon Route 53
in the Amazon Route 53 Developer Guide. For more information, see Renewing Registration for a Domain
in the Amazon Route 53 Developer Guide. -
For API details, see RenewDomain
in Amazon CLI Command Reference.
-
The following code example shows how to use resend-contact-reachability-email.
- Amazon CLI
-
To resend the confirmation email to the current email address for the registrant contact
The following
resend-contact-reachability-emailcommand resends the confirmation email to the current email address for the registrant contact for the example.com domain.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains resend-contact-reachability-email \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "domainName": "example.com", "emailAddress": "moliveira@example.com", "isAlreadyVerified": true }If the value of
isAlreadyVerifiedistrue, as in this example, the registrant contact has already confirmed that the specified email address is reachable.For more information, see Resending Authorization and Confirmation Emails
in the Amazon Route 53 Developer Guide. -
For API details, see ResendContactReachabilityEmail
in Amazon CLI Command Reference.
-
The following code example shows how to use retrieve-domain-auth-code.
- Amazon CLI
-
To get the authorization code for a domain so you can transfer the domain to another registrar
The following
retrieve-domain-auth-codecommand gets the current authorization code for the example.com domain. You give this value to another domain registrar when you want to transfer the domain to that registrar.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains retrieve-domain-auth-code \ --regionus-east-1\ --domain-nameexample.comOutput:
{ "AuthCode": ")o!v3dJeXampLe" }For more information, see Transferring a Domain from Amazon Route 53 to Another Registrar
in the Amazon Route 53 Developer Guide. -
For API details, see RetrieveDomainAuthCode
in Amazon CLI Command Reference.
-
The following code example shows how to use transfer-domain.
- Amazon CLI
-
To transfer a domain to Amazon Route 53
The following
transfer-domaincommand transfers a domain to Route 53, with the parameters provided by the JSON-formatted fileC:\temp\transfer-domain.json.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains transfer-domain \ --regionus-east-1\ --cli-input-json file://C:\temp\transfer-domain.jsonContents of
transfer-domain.json:{ "DomainName": "example.com", "DurationInYears": 1, "Nameservers": [ { "Name": "ns-2048.awsdns-64.com" }, { "Name": "ns-2049.awsdns-65.net" }, { "Name": "ns-2050.awsdns-66.org" }, { "Name": "ns-2051.awsdns-67.co.uk" } ], "AuthCode": ")o!v3dJeXampLe", "AutoRenew": true, "AdminContact": { "FirstName": "Martha", "LastName": "Rivera", "ContactType": "PERSON", "OrganizationName": "Example", "AddressLine1": "1 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "mrivera@example.com" }, "RegistrantContact": { "FirstName": "Li", "LastName": "Juan", "ContactType": "PERSON", "OrganizationName": "Example", "AddressLine1": "1 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "ljuan@example.com" }, "TechContact": { "FirstName": "Mateo", "LastName": "Jackson", "ContactType": "PERSON", "OrganizationName": "Example", "AddressLine1": "1 Main Street", "City": "Anytown", "State": "WA", "CountryCode": "US", "ZipCode": "98101", "PhoneNumber": "+1.8005551212", "Email": "mjackson@example.com" }, "PrivacyProtectAdminContact": true, "PrivacyProtectRegistrantContact": true, "PrivacyProtectTechContact": true }Output:
{ "OperationId": "b114c44a-9330-47d1-a6e8-a0b11example" }To confirm that the operation succeeded, you can run
get-operation-detail. For more information, see get-operation-detail. For more information, see Transferring Registration for a Domain to Amazon Route 53
in the Amazon Route 53 Developer Guide. -
For API details, see TransferDomain
in Amazon CLI Command Reference.
-
The following code example shows how to use update-domain-contact-privacy.
- Amazon CLI
-
To update the privacy settings for the contacts for a domain
The following
update-domain-contact-privacycommand turns off privacy protection for the administrative contact for the example.com domain. This command runs only in theus-east-1Region.If your default region is set to
us-east-1, you can omit theregionparameter.aws route53domains update-domain-contact-privacy \ --regionus-east-1\ --domain-nameexample.com\ --no-admin-privacyOutput:
{ "OperationId": "b3a219e9-d801-4244-b533-b7256example" }To confirm that the operation succeeded, you can run
get-operation-detail. For more information, see get-operation-detail. For more information, see Enabling or Disabling Privacy Protection for Contact Information for a Domain
in the Amazon Route 53 Developer Guide. -
For API details, see UpdateDomainContactPrivacy
in Amazon CLI Command Reference.
-
The following code example shows how to use update-domain-contact.
- Amazon CLI
-
To update the contact information for a domain
The following
update-domain-contactcommand updates the contact information for a domain, getting the parameters from the JSON-formatted fileC:\temp\update-domain-contact.json.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains update-domain-contact \ --regionus-east-1\ --cli-input-json file://C:\temp\update-domain-contact.jsonContents of
update-domain-contact.json:{ "AdminContact": { "AddressLine1": "101 Main Street", "AddressLine2": "Suite 1a", "City": "Seattle", "ContactType": "COMPANY", "CountryCode": "US", "Email": "w.xiulan@example.com", "FirstName": "Wang", "LastName": "Xiulan", "OrganizationName": "Example", "PhoneNumber": "+1.8005551212", "State": "WA", "ZipCode": "98101" }, "DomainName": "example.com", "RegistrantContact": { "AddressLine1": "101 Main Street", "AddressLine2": "Suite 1a", "City": "Seattle", "ContactType": "COMPANY", "CountryCode": "US", "Email": "w.xiulan@example.com", "FirstName": "Wang", "LastName": "Xiulan", "OrganizationName": "Example", "PhoneNumber": "+1.8005551212", "State": "WA", "ZipCode": "98101" }, "TechContact": { "AddressLine1": "101 Main Street", "AddressLine2": "Suite 1a", "City": "Seattle", "ContactType": "COMPANY", "CountryCode": "US", "Email": "w.xiulan@example.com", "FirstName": "Wang", "LastName": "Xiulan", "OrganizationName": "Example", "PhoneNumber": "+1.8005551212", "State": "WA", "ZipCode": "98101" } }Output:
{ "OperationId": "b3a219e9-d801-4244-b533-b7256example" }To confirm that the operation succeeded, you can run get-domain-detail
. For more information, see Updating Contact Information for a Domain in the Amazon Route 53 Developer Guide. -
For API details, see UpdateDomainContact
in Amazon CLI Command Reference.
-
The following code example shows how to use update-domain-nameservers.
- Amazon CLI
-
To update the name servers for a domain
The following
update-domain-nameserverscommand updates the name servers for a domain.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains update-domain-nameservers \ --regionus-east-1\ --domain-nameexample.com\ --nameserversName=ns-1.awsdns-01.orgName=ns-2.awsdns-02.co.ukName=ns-3.awsdns-03.netName=ns-4.awsdns-04.comOutput:
{ "OperationId": "f1691ec4-0e7a-489e-82e0-b19d3example" }To confirm that the operation succeeded, you can run get-domain-detail
. For more information, see Adding or Changing Name Servers and Glue Records for a Domain
in the Amazon Route 53 Developer Guide. -
For API details, see UpdateDomainNameservers
in Amazon CLI Command Reference.
-
The following code example shows how to use update-tags-for-domain.
- Amazon CLI
-
To add or update tags for a domain
The following
update-tags-for-domaincommand adds or updates two keys and the corresponding values for the example.com domain. To update the value for a key, just include the key and the new value. You can add or update tags in only one domain at a time.This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains update-tags-for-domain \ --regionus-east-1\ --domain-nameexample.com\ --tags-to-update"Key=key1,Value=value1""Key=key2,Value=value2"This command produces no output. To confirm that the tags were added or updated, you can run list-tags-for-domain
. For more information, see Tagging Amazon Route 53 Resources
in the Amazon Route 53 Developer Guide. -
For API details, see UpdateTagsForDomain
in Amazon CLI Command Reference.
-
The following code example shows how to use view-billing.
- Amazon CLI
-
To get billing information for domain registration charges for the current Amazon account
The following
view-billingcommand returns all the domain-related billing records for the current account for the period from January 1, 2018 (1514764800 in Unix time) and midnight on December 31, 2019 (1577836800 in Unix time).This command runs only in the
us-east-1Region. If your default region is set tous-east-1, you can omit theregionparameter.aws route53domains view-billing \ --regionus-east-1\ --start-time1514764800\ --end-time1577836800Output:
{ "BillingRecords": [ { "DomainName": "example.com", "Operation": "RENEW_DOMAIN", "InvoiceId": "149962827", "BillDate": 1536618063.181, "Price": 12.0 }, { "DomainName": "example.com", "Operation": "RENEW_DOMAIN", "InvoiceId": "290913289", "BillDate": 1568162630.884, "Price": 12.0 } ] }For more information, see ViewBilling
in the Amazon Route 53 API Reference. -
For API details, see ViewBilling
in Amazon CLI Command Reference.
-