Interface Dns (2.16.0)

public interface Dns extends Service<DnsOptions>

An interface for the Google Cloud DNS service. See Also: Google Cloud DNS

Implements

com.google.cloud.Service<com.google.cloud.dns.DnsOptions>

Methods

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

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

Submits a change request for the specified zone. The returned object contains the following read-only fields supplied by the server: id, start time and status. time, id, and list of name servers. The fields to be returned can be selected by ChangeRequestOptions. See Also: Cloud DNS Changes: create

Parameters
NameDescription
zoneNameString
changeRequestChangeRequestInfo
optionsChangeRequestOption[]
Returns
TypeDescription
ChangeRequest

the new ChangeRequest

batch()

public abstract DnsBatch batch()

Creates a new empty batch for grouping multiple service calls in one underlying RPC call.

Returns
TypeDescription
DnsBatch

create(ZoneInfo zoneInfo, Dns.ZoneOption[] options)

public abstract Zone create(ZoneInfo zoneInfo, Dns.ZoneOption[] options)

Creates a new zone.

Returns Zone object representing the new zone's information. In addition to the name, dns name and description (supplied by the user within the zoneInfo parameter), the returned object can include the following read-only fields supplied by the server: creation time, id, and list of name servers. The returned fields can be optionally restricted by specifying ZoneOptions. See Also: Cloud DNS Managed Zones: create

Parameters
NameDescription
zoneInfoZoneInfo
optionsZoneOption[]
Returns
TypeDescription
Zone

delete(String zoneName)

public abstract boolean delete(String zoneName)

Deletes an existing zone identified by name. Returns true if the zone was successfully deleted and false otherwise. See Also: Cloud DNS Managed Zones: delete

Parameter
NameDescription
zoneNameString
Returns
TypeDescription
boolean

true if zone was found and deleted and false otherwise

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

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

Retrieves updated information about a change request previously submitted for a zone identified by ID. Returns null if the request cannot be found and throws an exception if the zone does not exist. The fields to be returned using can be specified using ChangeRequestOptions. See Also: Cloud DNS Chages: get

Parameters
NameDescription
zoneNameString
changeRequestIdString
optionsChangeRequestOption[]
Returns
TypeDescription
ChangeRequest

getProject(Dns.ProjectOption[] fields)

public abstract ProjectInfo getProject(Dns.ProjectOption[] fields)

Retrieves the information about the current project. The returned fields can be optionally restricted by specifying ProjectOptions. See Also: Cloud DNS Projects: get

Parameter
NameDescription
fieldsProjectOption[]
Returns
TypeDescription
ProjectInfo

getZone(String zoneName, Dns.ZoneOption[] options)

public abstract Zone getZone(String zoneName, Dns.ZoneOption[] options)

Returns the zone by the specified zone name. Returns null if the zone is not found. The returned fields can be optionally restricted by specifying ZoneOptions. See Also: Cloud DNS Managed Zones: get

Parameters
NameDescription
zoneNameString
optionsZoneOption[]
Returns
TypeDescription
Zone

listChangeRequests(String zoneName, Dns.ChangeRequestListOption[] options)

public abstract Page<ChangeRequest> listChangeRequests(String zoneName, Dns.ChangeRequestListOption[] options)

Lists the change requests for the zone identified by name that were submitted to the service.

The sorting order for changes (based on when they were received by the server), fields to be returned, page size and page token can be specified using ChangeRequestListOptions. See Also: Cloud DNS Chages: list

Parameters
NameDescription
zoneNameString
optionsChangeRequestListOption[]
Returns
TypeDescription
Page<ChangeRequest>

A page of change requests

listRecordSets(String zoneName, Dns.RecordSetListOption[] options)

public abstract Page<RecordSet> listRecordSets(String zoneName, Dns.RecordSetListOption[] options)

Lists the record sets in the zone identified by name.

The fields to be returned, page size and page tokens can be specified using RecordSetListOptions. See Also: Cloud DNS ResourceRecordSets: list

Parameters
NameDescription
zoneNameString
optionsRecordSetListOption[]
Returns
TypeDescription
Page<RecordSet>

listZones(Dns.ZoneListOption[] options)

public abstract Page<Zone> listZones(Dns.ZoneListOption[] options)

Lists the zones inside the project.

This method returns zones in an unspecified order. New zones do not necessarily appear at the end of the list. Use ZoneListOption to restrict the listing to a domain name, set page size, and set page token. See Also: Cloud DNS Managed Zones: list

Parameter
NameDescription
optionsZoneListOption[]
Returns
TypeDescription
Page<Zone>

a page of zones