Class Zone (2.42.0)

public class Zone extends ZoneInfo

A Google Cloud DNS Zone object.

A zone is the container for all of your record sets that share the same DNS name prefix, for example, example.com. Zones are automatically assigned a set of name servers when they are created to handle responding to DNS queries for that zone. A zone has quotas for the number of record sets that it can include. See Also: Google Cloud DNS managed zone documentation

Inheritance

Object > ZoneInfo > Zone

Methods

applyChangeRequest(ChangeRequestInfo changeRequest, Dns.ChangeRequestOption[] options)

public ChangeRequest applyChangeRequest(ChangeRequestInfo changeRequest, Dns.ChangeRequestOption[] options)

Submits ChangeRequestInfo to the service for it to applied to this zone. The method searches for zone by name.

Parameters
Name Description
changeRequest ChangeRequestInfo
options ChangeRequestOption[]

optional restriction on what fields of ChangeRequest should be returned

Returns
Type Description
ChangeRequest

ChangeRequest with server-assigned ID

delete()

public boolean delete()

Deletes the zone. The method deletes the zone by name.

Returns
Type Description
boolean

true is zone was found and deleted and false otherwise

equals(Object obj)

public final boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getChangeRequest(String changeRequestId, Dns.ChangeRequestOption[] options)

public ChangeRequest getChangeRequest(String changeRequestId, Dns.ChangeRequestOption[] options)

Retrieves an updated information about a change request previously submitted to be applied to this zone. Returns a ChangeRequest or null if the change request was not found. Throws DnsException if the zone is not found.

Parameters
Name Description
changeRequestId String
options ChangeRequestOption[]

optional restriction on what fields of ChangeRequest should be returned

Returns
Type Description
ChangeRequest

updated ChangeRequest

getDns()

public Dns getDns()

Returns the Dns service object associated with this zone.

Returns
Type Description
Dns

hashCode()

public final int hashCode()
Returns
Type Description
int
Overrides

listChangeRequests(Dns.ChangeRequestListOption[] options)

public Page<ChangeRequest> listChangeRequests(Dns.ChangeRequestListOption[] options)

Retrieves all change requests for this zone. The method searches for zone by name. Returns a page of ChangeRequests.

Parameter
Name Description
options ChangeRequestListOption[]

optional restriction on listing and fields to be returned

Returns
Type Description
Page<ChangeRequest>

a page of change requests

listRecordSets(Dns.RecordSetListOption[] options)

public Page<RecordSet> listRecordSets(Dns.RecordSetListOption[] options)

Lists all RecordSets associated with this zone. The method searches for zone by name.

Parameter
Name Description
options RecordSetListOption[]

optional restriction on listing and fields of RecordSets returned

Returns
Type Description
Page<RecordSet>

a page of record sets

reload(Dns.ZoneOption[] options)

public Zone reload(Dns.ZoneOption[] options)

Retrieves the latest information about the zone. The method retrieves the zone by name.

Parameter
Name Description
options ZoneOption[]

optional restriction on what fields should be fetched

Returns
Type Description
Zone

zone object containing updated information or null if not not found

toBuilder()

public Zone.Builder toBuilder()

Returns a builder for ZoneInfo prepopulated with the metadata of this zone.

Returns
Type Description
Zone.Builder
Overrides