Class Zone (2.10.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
NameDescription
changeRequestChangeRequestInfo
optionsChangeRequestOption[]

optional restriction on what fields of ChangeRequest should be returned

Returns
TypeDescription
ChangeRequest

ChangeRequest with server-assigned ID

delete()

public boolean delete()

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

Returns
TypeDescription
boolean

true is zone was found and deleted and false otherwise

equals(Object obj)

public final boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
changeRequestIdString
optionsChangeRequestOption[]

optional restriction on what fields of ChangeRequest should be returned

Returns
TypeDescription
ChangeRequest

updated ChangeRequest

getDns()

public Dns getDns()

Returns the Dns service object associated with this zone.

Returns
TypeDescription
Dns

hashCode()

public final int hashCode()
Returns
TypeDescription
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
NameDescription
optionsChangeRequestListOption[]

optional restriction on listing and fields to be returned

Returns
TypeDescription
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
NameDescription
optionsRecordSetListOption[]

optional restriction on listing and fields of RecordSets returned

Returns
TypeDescription
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
NameDescription
optionsZoneOption[]

optional restriction on what fields should be fetched

Returns
TypeDescription
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
TypeDescription
Zone.Builder
Overrides