Reference documentation and code samples for the google-cloud-dns class Google::Cloud::Dns::Change.
DNS Change
Represents a request containing additions or deletions or records. Additions and deletions can be done in bulk, in a single atomic transaction, and take effect at the same time in each authoritative DNS server.
Inherits
- Object
Example
require "google/cloud/dns" dns = Google::Cloud::Dns.new zone = dns.zone "example-com" zone.changes.each do |change| puts "Change includes #{change.additions.count} additions " \ "and #{change.additions.count} deletions." end
Methods
#additions
def additions()
The records added in this change request.
#deletions
def deletions()
The records removed in this change request.
#done?
def done?() -> Boolean
Checks if the status is "done"
.
- (Boolean)
#id
def id()
Unique identifier for the resource; defined by the server.
#pending?
def pending?() -> Boolean
Checks if the status is "pending"
.
- (Boolean)
#refresh!
def refresh!()
Reloads the change with updated status from the DNS service.
#reload!
def reload!()
Reloads the change with updated status from the DNS service.
#started_at
def started_at()
The time that this operation was started by the server.
#status
def status()
Status of the operation. Values are "done"
and "pending"
.
#wait_until_done!
def wait_until_done!()
Refreshes the change until the status is done
.
The delay between refreshes will incrementally increase.
require "google/cloud/dns" dns = Google::Cloud::Dns.new zone = dns.zone "example-com" change = zone.change 1234567890 change.done? #=> false change.wait_until_done! change.done? #=> true