Interface Dns (2.43.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
Name Description
zoneName String
changeRequest ChangeRequestInfo
options ChangeRequestOption[]
Returns
Type Description
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
Type Description
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
Name Description
zoneInfo ZoneInfo
options ZoneOption[]
Returns
Type Description
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
Name Description
zoneName String
Returns
Type Description
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
Name Description
zoneName String
changeRequestId String
options ChangeRequestOption[]
Returns
Type Description
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
Name Description
fields ProjectOption[]
Returns
Type Description
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
Name Description
zoneName String
options ZoneOption[]
Returns
Type Description
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
Name Description
zoneName String
options ChangeRequestListOption[]
Returns
Type Description
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
Name Description
zoneName String
options RecordSetListOption[]
Returns
Type Description
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
Name Description
options ZoneListOption[]
Returns
Type Description
Page<Zone>

a page of zones