You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::Route53Domains::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Route53Domains::Client
- Defined in:
- (unknown)
Overview
An API client for Amazon Route 53 Domains. To construct a client, you need to configure a :region
and :credentials
.
route53domains = Aws::Route53Domains::Client.new(
region: region_name,
credentials: credentials,
# ...
)
See #initialize for a full list of supported configuration options.
Region
You can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
Credentials
Default credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
andENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
- The shared credentials ini file at
~/.aws/credentials
(more information) - From an instance profile when running on EC2
You can also construct a credentials object from one of the following classes:
Alternatively, you configure credentials with :access_key_id
and
:secret_access_key
:
# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))
Aws::Route53Domains::Client.new(
access_key_id: creds['access_key_id'],
secret_access_key: creds['secret_access_key']
)
Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
Constructor collapse
-
#initialize(options = {}) ⇒ Aws::Route53Domains::Client
constructor
Constructs an API client.
API Operations collapse
-
#accept_domain_transfer_from_another_aws_account(options = {}) ⇒ Types::AcceptDomainTransferFromAnotherAwsAccountResponse
Accepts the transfer of a domain from another AWS account to the current AWS account.
-
#cancel_domain_transfer_to_another_aws_account(options = {}) ⇒ Types::CancelDomainTransferToAnotherAwsAccountResponse
Cancels the transfer of a domain from the current AWS account to another AWS account.
-
#check_domain_availability(options = {}) ⇒ Types::CheckDomainAvailabilityResponse
This operation checks the availability of one domain name.
-
#check_domain_transferability(options = {}) ⇒ Types::CheckDomainTransferabilityResponse
Checks whether a domain name can be transferred to Amazon Route 53.
-
#delete_tags_for_domain(options = {}) ⇒ Struct
This operation deletes the specified tags for a domain.
All tag operations are eventually consistent; subsequent operations might not immediately represent all issued operations.
. -
#disable_domain_auto_renew(options = {}) ⇒ Struct
This operation disables automatic renewal of domain registration for the specified domain.
.
-
#disable_domain_transfer_lock(options = {}) ⇒ Types::DisableDomainTransferLockResponse
This operation removes the transfer lock on the domain (specifically the
clientTransferProhibited
status) to allow domain transfers. -
#enable_domain_auto_renew(options = {}) ⇒ Struct
This operation configures Amazon Route 53 to automatically renew the specified domain before the domain registration expires.
-
#enable_domain_transfer_lock(options = {}) ⇒ Types::EnableDomainTransferLockResponse
This operation sets the transfer lock on the domain (specifically the
clientTransferProhibited
status) to prevent domain transfers. -
#get_contact_reachability_status(options = {}) ⇒ Types::GetContactReachabilityStatusResponse
For operations that require confirmation that the email address for the registrant contact is valid, such as registering a new domain, this operation returns information about whether the registrant contact has responded.
If you want us to resend the email, use the
.ResendContactReachabilityEmail
operation. -
#get_domain_detail(options = {}) ⇒ Types::GetDomainDetailResponse
This operation returns detailed information about a specified domain that is associated with the current AWS account.
-
#get_domain_suggestions(options = {}) ⇒ Types::GetDomainSuggestionsResponse
The GetDomainSuggestions operation returns a list of suggested domain names.
.
-
#get_operation_detail(options = {}) ⇒ Types::GetOperationDetailResponse
This operation returns the current status of an operation that is not completed.
.
-
#list_domains(options = {}) ⇒ Types::ListDomainsResponse
This operation returns all the domain names registered with Amazon Route 53 for the current AWS account.
.
-
#list_operations(options = {}) ⇒ Types::ListOperationsResponse
Returns information about all of the operations that return an operation ID and that have ever been performed on domains that were registered by the current account.
-
#list_tags_for_domain(options = {}) ⇒ Types::ListTagsForDomainResponse
This operation returns all of the tags that are associated with the specified domain.
All tag operations are eventually consistent; subsequent operations might not immediately represent all issued operations.
. -
#register_domain(options = {}) ⇒ Types::RegisterDomainResponse
This operation registers a domain.
-
#reject_domain_transfer_from_another_aws_account(options = {}) ⇒ Types::RejectDomainTransferFromAnotherAwsAccountResponse
Rejects the transfer of a domain from another AWS account to the current AWS account.
-
#renew_domain(options = {}) ⇒ Types::RenewDomainResponse
This operation renews a domain for the specified number of years.
-
#resend_contact_reachability_email(options = {}) ⇒ Types::ResendContactReachabilityEmailResponse
For operations that require confirmation that the email address for the registrant contact is valid, such as registering a new domain, this operation resends the confirmation email to the current email address for the registrant contact.
.
-
#retrieve_domain_auth_code(options = {}) ⇒ Types::RetrieveDomainAuthCodeResponse
This operation returns the AuthCode for the domain.
-
#transfer_domain(options = {}) ⇒ Types::TransferDomainResponse
Transfers a domain from another registrar to Amazon Route 53.
-
#transfer_domain_to_another_aws_account(options = {}) ⇒ Types::TransferDomainToAnotherAwsAccountResponse
Transfers a domain from the current AWS account to another AWS account.
-
#update_domain_contact(options = {}) ⇒ Types::UpdateDomainContactResponse
This operation updates the contact information for a particular domain.
-
#update_domain_contact_privacy(options = {}) ⇒ Types::UpdateDomainContactPrivacyResponse
This operation updates the specified domain contact's privacy setting.
-
#update_domain_nameservers(options = {}) ⇒ Types::UpdateDomainNameserversResponse
This operation replaces the current set of name servers for the domain with the specified set of name servers.
-
#update_tags_for_domain(options = {}) ⇒ Struct
This operation adds or updates tags for a specified domain.
All tag operations are eventually consistent; subsequent operations might not immediately represent all issued operations.
. -
#view_billing(options = {}) ⇒ Types::ViewBillingResponse
Returns all the domain-related billing records for the current AWS account for a specified period
.
Instance Method Summary collapse
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
Methods inherited from Seahorse::Client::Base
add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options = {}) ⇒ Aws::Route53Domains::Client
Constructs an API client.
Instance Method Details
#accept_domain_transfer_from_another_aws_account(options = {}) ⇒ Types::AcceptDomainTransferFromAnotherAwsAccountResponse
Accepts the transfer of a domain from another AWS account to the current AWS account. You initiate a transfer between AWS accounts using TransferDomainToAnotherAwsAccount.
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
.
#cancel_domain_transfer_to_another_aws_account(options = {}) ⇒ Types::CancelDomainTransferToAnotherAwsAccountResponse
Cancels the transfer of a domain from the current AWS account to another AWS account. You initiate a transfer between AWS accounts using TransferDomainToAnotherAwsAccount.
You must cancel the transfer before the other AWS account accepts the transfer using AcceptDomainTransferFromAnotherAwsAccount.
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
.
#check_domain_availability(options = {}) ⇒ Types::CheckDomainAvailabilityResponse
This operation checks the availability of one domain name. Note that if the availability status of a domain is pending, you must submit another request to determine the availability of the domain name.
#check_domain_transferability(options = {}) ⇒ Types::CheckDomainTransferabilityResponse
Checks whether a domain name can be transferred to Amazon Route 53.
#delete_tags_for_domain(options = {}) ⇒ Struct
This operation deletes the specified tags for a domain.
All tag operations are eventually consistent; subsequent operations might not immediately represent all issued operations.
#disable_domain_auto_renew(options = {}) ⇒ Struct
This operation disables automatic renewal of domain registration for the specified domain.
#disable_domain_transfer_lock(options = {}) ⇒ Types::DisableDomainTransferLockResponse
This operation removes the transfer lock on the domain (specifically the clientTransferProhibited
status) to allow domain transfers. We recommend you refrain from performing this action unless you intend to transfer the domain to a different registrar. Successful submission returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email.
#enable_domain_auto_renew(options = {}) ⇒ Struct
This operation configures Amazon Route 53 to automatically renew the specified domain before the domain registration expires. The cost of renewing your domain registration is billed to your AWS account.
The period during which you can renew a domain name varies by TLD. For a list of TLDs and their renewal policies, see Domains That You Can Register with Amazon Route 53 in the Amazon Route 53 Developer Guide. Route 53 requires that you renew before the end of the renewal period so we can complete processing before the deadline.
#enable_domain_transfer_lock(options = {}) ⇒ Types::EnableDomainTransferLockResponse
This operation sets the transfer lock on the domain (specifically the clientTransferProhibited
status) to prevent domain transfers. Successful submission returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email.
#get_contact_reachability_status(options = {}) ⇒ Types::GetContactReachabilityStatusResponse
For operations that require confirmation that the email address for the registrant contact is valid, such as registering a new domain, this operation returns information about whether the registrant contact has responded.
If you want us to resend the email, use the ResendContactReachabilityEmail
operation.
#get_domain_detail(options = {}) ⇒ Types::GetDomainDetailResponse
This operation returns detailed information about a specified domain that is associated with the current AWS account. Contact information for the domain is also returned as part of the output.
#get_domain_suggestions(options = {}) ⇒ Types::GetDomainSuggestionsResponse
The GetDomainSuggestions operation returns a list of suggested domain names.
#get_operation_detail(options = {}) ⇒ Types::GetOperationDetailResponse
This operation returns the current status of an operation that is not completed.
#list_domains(options = {}) ⇒ Types::ListDomainsResponse
This operation returns all the domain names registered with Amazon Route 53 for the current AWS account.
#list_operations(options = {}) ⇒ Types::ListOperationsResponse
Returns information about all of the operations that return an operation ID and that have ever been performed on domains that were registered by the current account.
#list_tags_for_domain(options = {}) ⇒ Types::ListTagsForDomainResponse
This operation returns all of the tags that are associated with the specified domain.
All tag operations are eventually consistent; subsequent operations might not immediately represent all issued operations.
#register_domain(options = {}) ⇒ Types::RegisterDomainResponse
This operation registers a domain. Domains are registered either by Amazon Registrar (for .com, .net, and .org domains) or by our registrar associate, Gandi (for all other domains). For some top-level domains (TLDs), this operation requires extra parameters.
When you register a domain, Amazon Route 53 does the following:
-
Creates a Route 53 hosted zone that has the same name as the domain. Route 53 assigns four name servers to your hosted zone and automatically updates your domain registration with the names of these name servers.
-
Enables autorenew, so your domain registration will renew automatically each year. We'll notify you in advance of the renewal date so you can choose whether to renew the registration.
-
Optionally enables privacy protection, so WHOIS queries return contact information either for Amazon Registrar (for .com, .net, and .org domains) or for our registrar associate, Gandi (for all other TLDs). If you don't enable privacy protection, WHOIS queries return the information that you entered for the registrant, admin, and tech contacts.
-
If registration is successful, returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant is notified by email.
-
Charges your AWS account an amount based on the top-level domain. For more information, see Amazon Route 53 Pricing.
#reject_domain_transfer_from_another_aws_account(options = {}) ⇒ Types::RejectDomainTransferFromAnotherAwsAccountResponse
Rejects the transfer of a domain from another AWS account to the current AWS account. You initiate a transfer between AWS accounts using TransferDomainToAnotherAwsAccount.
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
.
#renew_domain(options = {}) ⇒ Types::RenewDomainResponse
This operation renews a domain for the specified number of years. The cost of renewing your domain is billed to your AWS account.
We recommend that you renew your domain several weeks before the expiration date. Some TLD registries delete domains before the expiration date if you haven't renewed far enough in advance. For more information about renewing domain registration, see Renewing Registration for a Domain in the Amazon Route 53 Developer Guide.
#resend_contact_reachability_email(options = {}) ⇒ Types::ResendContactReachabilityEmailResponse
For operations that require confirmation that the email address for the registrant contact is valid, such as registering a new domain, this operation resends the confirmation email to the current email address for the registrant contact.
#retrieve_domain_auth_code(options = {}) ⇒ Types::RetrieveDomainAuthCodeResponse
This operation returns the AuthCode for the domain. To transfer a domain to another registrar, you provide this value to the new registrar.
#transfer_domain(options = {}) ⇒ Types::TransferDomainResponse
Transfers a domain from another registrar to Amazon Route 53. When the transfer is complete, the domain is registered either with Amazon Registrar (for .com, .net, and .org domains) or with our registrar associate, Gandi (for all other TLDs).
For more information about transferring domains, see the following topics:
-
For transfer requirements, a detailed procedure, and information about viewing the status of a domain that you're transferring to Route 53, see Transferring Registration for a Domain to Amazon Route 53 in the Amazon Route 53 Developer Guide.
-
For information about how to transfer a domain from one AWS account to another, see TransferDomainToAnotherAwsAccount.
-
For information about how to transfer a domain to another domain registrar, see Transferring a Domain from Amazon Route 53 to Another Registrar in the Amazon Route 53 Developer Guide.
If the registrar for your domain is also the DNS service provider for the domain, we highly recommend that you transfer your DNS service to Route 53 or to another DNS service provider before you transfer your registration. Some registrars provide free DNS service when you purchase a domain registration. When you transfer the registration, the previous registrar will not renew your domain registration and could end your DNS service at any time.
If the registrar for your domain is also the DNS service provider for the domain and you don't transfer DNS service to another provider, your website, email, and the web applications associated with the domain might become unavailable.
If the transfer is successful, this method returns an operation ID that you can use to track the progress and completion of the action. If the transfer doesn't complete successfully, the domain registrant will be notified by email.
#transfer_domain_to_another_aws_account(options = {}) ⇒ Types::TransferDomainToAnotherAwsAccountResponse
Transfers a domain from the current AWS account to another AWS account. Note the following:
-
The AWS 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 AcceptDomainTransferFromAnotherAwsAccount.
-
You can cancel the transfer before the other account accepts it. See CancelDomainTransferToAnotherAwsAccount.
-
The other account can reject the transfer. See RejectDomainTransferFromAnotherAwsAccount.
When you transfer a domain from one AWS 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 AWS account, see Migrating a Hosted Zone to a Different AWS 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
.
#update_domain_contact(options = {}) ⇒ Types::UpdateDomainContactResponse
This operation updates the contact information for a particular domain. You must specify information for at least one contact: registrant, administrator, or technical.
If the update is successful, this method returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email.
#update_domain_contact_privacy(options = {}) ⇒ Types::UpdateDomainContactPrivacyResponse
This operation updates the specified domain contact's privacy setting. When privacy protection is enabled, contact information such as email address is replaced either with contact information for Amazon Registrar (for .com, .net, and .org domains) or with contact information for our registrar associate, Gandi.
This operation affects only the contact information for the specified contact type (registrant, administrator, or tech). If the request succeeds, Amazon Route 53 returns an operation ID that you can use with GetOperationDetail to track the progress and completion of the action. If the request doesn't complete successfully, the domain registrant will be notified by email.
By disabling the privacy service via API, you consent to the publication of the contact information provided for this domain via the public WHOIS database. You certify that you are the registrant of this domain name and have the authority to make this decision. You may withdraw your consent at any time by enabling privacy protection using either UpdateDomainContactPrivacy
or the Route 53 console. Enabling privacy protection removes the contact information provided for this domain from the WHOIS database. For more information on our privacy practices, see https://aws.amazon.com/privacy/.
#update_domain_nameservers(options = {}) ⇒ Types::UpdateDomainNameserversResponse
This operation replaces the current set of name servers for the domain with the specified set of name servers. If you use Amazon Route 53 as your DNS service, specify the four name servers in the delegation set for the hosted zone for the domain.
If successful, this operation returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email.
#update_tags_for_domain(options = {}) ⇒ Struct
This operation adds or updates tags for a specified domain.
All tag operations are eventually consistent; subsequent operations might not immediately represent all issued operations.
#view_billing(options = {}) ⇒ Types::ViewBillingResponse
Returns all the domain-related billing records for the current AWS account for a specified period
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
Basic Usage
Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success
or :failure
from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter
fails, it raises an error. All errors raised extend from
Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name | Client Method | Default Delay: | Default Max Attempts: |
---|