Package com.google.cloud.dns.spi.v1
Class HttpDnsRpc
- java.lang.Object
-
- com.google.cloud.dns.spi.v1.HttpDnsRpc
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.cloud.dns.spi.v1.DnsRpc
DnsRpc.ListResult<T>, DnsRpc.Option
-
-
Constructor Summary
Constructors Constructor Description HttpDnsRpc(DnsOptions options)
Constructs an instance of this rpc client with providedDnsOptions
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.services.dns.model.Change
applyChangeRequest(String zoneName, com.google.api.services.dns.model.Change changeRequest, Map<DnsRpc.Option,?> options)
Applies change request to a zone.com.google.api.services.dns.model.ManagedZone
create(com.google.api.services.dns.model.ManagedZone zone, Map<DnsRpc.Option,?> options)
Creates a new zone.RpcBatch
createBatch()
Creates an empty batch.boolean
deleteZone(String zoneName)
Deletes the zone identified by the name.com.google.api.services.dns.model.Change
getChangeRequest(String zoneName, String changeRequestId, Map<DnsRpc.Option,?> options)
Returns an existing change request.com.google.api.services.dns.model.Project
getProject(Map<DnsRpc.Option,?> options)
Returns information about the current project.com.google.api.services.dns.model.ManagedZone
getZone(String zoneName, Map<DnsRpc.Option,?> options)
Retrieves and returns an existing zone.DnsRpc.ListResult<com.google.api.services.dns.model.Change>
listChangeRequests(String zoneName, Map<DnsRpc.Option,?> options)
List existing change requests for a zone.DnsRpc.ListResult<com.google.api.services.dns.model.ResourceRecordSet>
listRecordSets(String zoneName, Map<DnsRpc.Option,?> options)
Lists record sets for a given zone.DnsRpc.ListResult<com.google.api.services.dns.model.ManagedZone>
listZones(Map<DnsRpc.Option,?> options)
Lists the zones that exist within the project.
-
-
-
Constructor Detail
-
HttpDnsRpc
public HttpDnsRpc(DnsOptions options)
Constructs an instance of this rpc client with providedDnsOptions
.
-
-
Method Detail
-
create
public com.google.api.services.dns.model.ManagedZone create(com.google.api.services.dns.model.ManagedZone zone, Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
Creates a new zone.- Specified by:
create
in interfaceDnsRpc
- Parameters:
zone
- a zone to be createdoptions
- a map of options for the service call- Returns:
- Updated
ManagedZone
object - Throws:
DnsException
- upon failure
-
getZone
public com.google.api.services.dns.model.ManagedZone getZone(String zoneName, Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
Retrieves and returns an existing zone.- Specified by:
getZone
in interfaceDnsRpc
- Parameters:
zoneName
- name of the zone to be returnedoptions
- a map of options for the service call- Returns:
- a zone or
null
if not found - Throws:
DnsException
- upon failure
-
listZones
public DnsRpc.ListResult<com.google.api.services.dns.model.ManagedZone> listZones(Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
Lists the zones that exist within the project.- Specified by:
listZones
in interfaceDnsRpc
- Parameters:
options
- a map of options for the service call- Throws:
DnsException
- upon failure
-
deleteZone
public boolean deleteZone(String zoneName) throws DnsException
Description copied from interface:DnsRpc
Deletes the zone identified by the name.- Specified by:
deleteZone
in interfaceDnsRpc
- Returns:
true
if the zone was deleted andfalse
otherwise- Throws:
DnsException
- upon failure
-
listRecordSets
public DnsRpc.ListResult<com.google.api.services.dns.model.ResourceRecordSet> listRecordSets(String zoneName, Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
Lists record sets for a given zone.- Specified by:
listRecordSets
in interfaceDnsRpc
- Parameters:
zoneName
- name of the zone to be listedoptions
- a map of options for the service call- Throws:
DnsException
- upon failure or if zone was not found
-
getProject
public com.google.api.services.dns.model.Project getProject(Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
Returns information about the current project.- Specified by:
getProject
in interfaceDnsRpc
- Parameters:
options
- a map of options for the service call- Returns:
- up-to-date project information
- Throws:
DnsException
- upon failure or if the project is not found
-
applyChangeRequest
public com.google.api.services.dns.model.Change applyChangeRequest(String zoneName, com.google.api.services.dns.model.Change changeRequest, Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
Applies change request to a zone.- Specified by:
applyChangeRequest
in interfaceDnsRpc
- Parameters:
zoneName
- the name of a zone to which theChange
should be appliedchangeRequest
- change to be appliedoptions
- a map of options for the service call- Returns:
- updated change object with server-assigned ID
- Throws:
DnsException
- upon failure or if zone was not found
-
getChangeRequest
public com.google.api.services.dns.model.Change getChangeRequest(String zoneName, String changeRequestId, Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
Returns an existing change request.- Specified by:
getChangeRequest
in interfaceDnsRpc
- Parameters:
zoneName
- the name of a zone to which theChange
was be appliedchangeRequestId
- the unique id assigned to the change by the serveroptions
- a map of options for the service call- Returns:
- up-to-date change object or
null
if change was not found - Throws:
DnsException
- upon failure or if zone was not found
-
listChangeRequests
public DnsRpc.ListResult<com.google.api.services.dns.model.Change> listChangeRequests(String zoneName, Map<DnsRpc.Option,?> options) throws DnsException
Description copied from interface:DnsRpc
List existing change requests for a zone.- Specified by:
listChangeRequests
in interfaceDnsRpc
- Parameters:
zoneName
- the name of a zone to which theChange
s were be appliedoptions
- a map of options for the service call- Throws:
DnsException
- upon failure or if zone was not found
-
createBatch
public RpcBatch createBatch()
Description copied from interface:DnsRpc
Creates an empty batch.- Specified by:
createBatch
in interfaceDnsRpc
-
-