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.ChangeapplyChangeRequest(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.ManagedZonecreate(com.google.api.services.dns.model.ManagedZone zone, Map<DnsRpc.Option,?> options)Creates a new zone.RpcBatchcreateBatch()Creates an empty batch.booleandeleteZone(String zoneName)Deletes the zone identified by the name.com.google.api.services.dns.model.ChangegetChangeRequest(String zoneName, String changeRequestId, Map<DnsRpc.Option,?> options)Returns an existing change request.com.google.api.services.dns.model.ProjectgetProject(Map<DnsRpc.Option,?> options)Returns information about the current project.com.google.api.services.dns.model.ManagedZonegetZone(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 DnsExceptionDescription copied from interface:DnsRpcCreates a new zone.- Specified by:
createin interfaceDnsRpc- Parameters:
zone- a zone to be createdoptions- a map of options for the service call- Returns:
- Updated
ManagedZoneobject - 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:DnsRpcRetrieves and returns an existing zone.- Specified by:
getZonein interfaceDnsRpc- Parameters:
zoneName- name of the zone to be returnedoptions- a map of options for the service call- Returns:
- a zone or
nullif 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:DnsRpcLists the zones that exist within the project.- Specified by:
listZonesin 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:DnsRpcDeletes the zone identified by the name.- Specified by:
deleteZonein interfaceDnsRpc- Returns:
trueif the zone was deleted andfalseotherwise- 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:DnsRpcLists record sets for a given zone.- Specified by:
listRecordSetsin 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:DnsRpcReturns information about the current project.- Specified by:
getProjectin 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:DnsRpcApplies change request to a zone.- Specified by:
applyChangeRequestin interfaceDnsRpc- Parameters:
zoneName- the name of a zone to which theChangeshould 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:DnsRpcReturns an existing change request.- Specified by:
getChangeRequestin interfaceDnsRpc- Parameters:
zoneName- the name of a zone to which theChangewas 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
nullif 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:DnsRpcList existing change requests for a zone.- Specified by:
listChangeRequestsin interfaceDnsRpc- Parameters:
zoneName- the name of a zone to which theChanges 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:DnsRpcCreates an empty batch.- Specified by:
createBatchin interfaceDnsRpc
-
-