# Cloud DNS API - Class Google::Cloud::Dns::Change (v1.2.0)

1.2.0 (latest) 1.1.1 1.0.0 0.37.0 0.36.1 0.35.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

```ruby
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!](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dns/latest/Google-Cloud-Dns-Change#Google__Cloud__Dns__Change_reload!_instance_) Reloads the change with updated status from the DNS service.

### #reload!

    def reload!()

**Aliases**

- [#refresh!](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dns/latest/Google-Cloud-Dns-Change#Google__Cloud__Dns__Change_refresh!_instance_)
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**

```ruby
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
```