Cloud DNS API - Class Google::Cloud::Dns::Change (v0.36.1)

Reference documentation and code samples for the Cloud DNS API 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".

Returns
  • (Boolean)

#id

def id()

Unique identifier for the resource; defined by the server.

#pending?

def pending?() -> Boolean

Checks if the status is "pending".

Returns
  • (Boolean)

#refresh!

def refresh!()
Alias Of: #reload!

Reloads the change with updated status from the DNS service.

#reload!

def reload!()
Aliases

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.

Example
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