Interface DnsRpc (2.51.0)

public interface DnsRpc extends ServiceRpc

Implements

com.google.cloud.ServiceRpc

Methods

applyChangeRequest(String zoneName, Change changeRequest, Map<DnsRpc.Option,?> options)

public abstract Change applyChangeRequest(String zoneName, Change changeRequest, Map<DnsRpc.Option,?> options)

Applies change request to a zone.

Parameters
Name Description
zoneName String

the name of a zone to which the Change should be applied

changeRequest com.google.api.services.dns.model.Change

change to be applied

options Map<Option,?>

a map of options for the service call

Returns
Type Description
com.google.api.services.dns.model.Change

updated change object with server-assigned ID

Exceptions
Type Description
DnsException

upon failure or if zone was not found

create(ManagedZone zone, Map<DnsRpc.Option,?> options)

public abstract ManagedZone create(ManagedZone zone, Map<DnsRpc.Option,?> options)

Creates a new zone.

Parameters
Name Description
zone com.google.api.services.dns.model.ManagedZone

a zone to be created

options Map<Option,?>

a map of options for the service call

Returns
Type Description
com.google.api.services.dns.model.ManagedZone

Updated ManagedZone object

Exceptions
Type Description
DnsException

upon failure

createBatch()

public abstract RpcBatch createBatch()

Creates an empty batch.

Returns
Type Description
RpcBatch

deleteZone(String zoneName)

public abstract boolean deleteZone(String zoneName)

Deletes the zone identified by the name.

Parameter
Name Description
zoneName String
Returns
Type Description
boolean

true if the zone was deleted and false otherwise

Exceptions
Type Description
DnsException

upon failure

getChangeRequest(String zoneName, String changeRequestId, Map<DnsRpc.Option,?> options)

public abstract Change getChangeRequest(String zoneName, String changeRequestId, Map<DnsRpc.Option,?> options)

Returns an existing change request.

Parameters
Name Description
zoneName String

the name of a zone to which the Change was be applied

changeRequestId String

the unique id assigned to the change by the server

options Map<Option,?>

a map of options for the service call

Returns
Type Description
com.google.api.services.dns.model.Change

up-to-date change object or null if change was not found

Exceptions
Type Description
DnsException

upon failure or if zone was not found

getProject(Map<DnsRpc.Option,?> options)

public abstract Project getProject(Map<DnsRpc.Option,?> options)

Returns information about the current project.

Parameter
Name Description
options Map<Option,?>

a map of options for the service call

Returns
Type Description
com.google.api.services.dns.model.Project

up-to-date project information

Exceptions
Type Description
DnsException

upon failure or if the project is not found

getZone(String zoneName, Map<DnsRpc.Option,?> options)

public abstract ManagedZone getZone(String zoneName, Map<DnsRpc.Option,?> options)

Retrieves and returns an existing zone.

Parameters
Name Description
zoneName String

name of the zone to be returned

options Map<Option,?>

a map of options for the service call

Returns
Type Description
com.google.api.services.dns.model.ManagedZone

a zone or null if not found

Exceptions
Type Description
DnsException

upon failure

listChangeRequests(String zoneName, Map<DnsRpc.Option,?> options)

public abstract DnsRpc.ListResult<Change> listChangeRequests(String zoneName, Map<DnsRpc.Option,?> options)

List existing change requests for a zone.

Parameters
Name Description
zoneName String

the name of a zone to which the Changes were be applied

options Map<Option,?>

a map of options for the service call

Returns
Type Description
ListResult<com.google.api.services.dns.model.Change>
Exceptions
Type Description
DnsException

upon failure or if zone was not found

listRecordSets(String zoneName, Map<DnsRpc.Option,?> options)

public abstract DnsRpc.ListResult<ResourceRecordSet> listRecordSets(String zoneName, Map<DnsRpc.Option,?> options)

Lists record sets for a given zone.

Parameters
Name Description
zoneName String

name of the zone to be listed

options Map<Option,?>

a map of options for the service call

Returns
Type Description
ListResult<com.google.api.services.dns.model.ResourceRecordSet>
Exceptions
Type Description
DnsException

upon failure or if zone was not found

listZones(Map<DnsRpc.Option,?> options)

public abstract DnsRpc.ListResult<ManagedZone> listZones(Map<DnsRpc.Option,?> options)

Lists the zones that exist within the project.

Parameter
Name Description
options Map<Option,?>

a map of options for the service call

Returns
Type Description
ListResult<com.google.api.services.dns.model.ManagedZone>
Exceptions
Type Description
DnsException

upon failure