Package com.google.cloud.dns
Class DnsBatch
- java.lang.Object
-
- com.google.cloud.dns.DnsBatch
-
public class DnsBatch extends Object
A batch of operations to be submitted to Google Cloud DNS using a single RPC request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsBatchResult<ChangeRequest>
applyChangeRequest(String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption... options)
Adds a request representing the "apply change request" operation to the zone specified byzoneName
to this batch.DnsBatchResult<Zone>
createZone(ZoneInfo zone, Dns.ZoneOption... options)
Adds a request representing the "create zone" operation to this batch.DnsBatchResult<Boolean>
deleteZone(String zoneName)
Adds a request representing the "delete zone" operation to this batch.DnsBatchResult<ChangeRequest>
getChangeRequest(String zoneName, String changeRequestId, Dns.ChangeRequestOption... options)
Adds a request representing the "get change request" operation for the zone specified byzoneName
to this batch.DnsBatchResult<ProjectInfo>
getProject(Dns.ProjectOption... options)
Adds a request representing the "get project" operation to this batch.DnsBatchResult<Zone>
getZone(String zoneName, Dns.ZoneOption... options)
Adds a request representing the "get zone" operation to this batch.DnsBatchResult<com.google.api.gax.paging.Page<ChangeRequest>>
listChangeRequests(String zoneName, Dns.ChangeRequestListOption... options)
Adds a request representing the "list change requests" operation in the zone specified byzoneName
to this batch.DnsBatchResult<com.google.api.gax.paging.Page<RecordSet>>
listRecordSets(String zoneName, Dns.RecordSetListOption... options)
Adds a request representing the "list record sets" operation in the zone specified byzoneName
to this batch.DnsBatchResult<com.google.api.gax.paging.Page<Zone>>
listZones(Dns.ZoneListOption... options)
Adds a request representing the "list zones" operation to this batch.void
submit()
Submits this batch for processing using a single RPC request.
-
-
-
Method Detail
-
listZones
public DnsBatchResult<com.google.api.gax.paging.Page<Zone>> listZones(Dns.ZoneListOption... options)
Adds a request representing the "list zones" operation to this batch. Theoptions
can be used to restrict the fields returned or provide page size limits in the same way as forDns.listZones(Dns.ZoneListOption...)
. CallingBatchResult.get()
on the return value yields a page of zones if successful and throws aDnsException
otherwise.
-
createZone
public DnsBatchResult<Zone> createZone(ZoneInfo zone, Dns.ZoneOption... options)
Adds a request representing the "create zone" operation to this batch. Theoptions
can be used to restrict the fields returned in the same way as forDns.create(ZoneInfo, Dns.ZoneOption...)
. CallingBatchResult.get()
on the return value yields the createdZone
if successful and throws aDnsException
otherwise.
-
deleteZone
public DnsBatchResult<Boolean> deleteZone(String zoneName)
Adds a request representing the "delete zone" operation to this batch. CallingBatchResult.get()
on the return value yieldstrue
upon successful deletion,false
if the zone was not found, or throws aDnsException
if the operation failed.
-
getZone
public DnsBatchResult<Zone> getZone(String zoneName, Dns.ZoneOption... options)
Adds a request representing the "get zone" operation to this batch. Theoptions
can be used to restrict the fields returned in the same way as forDns.getZone(String, Dns.ZoneOption...)
. CallingBatchResult.get()
on the return value yields the requestedZone
if successful,null
if no such zone exists, or throws aDnsException
if the operation failed.
-
getProject
public DnsBatchResult<ProjectInfo> getProject(Dns.ProjectOption... options)
Adds a request representing the "get project" operation to this batch. Theoptions
can be used to restrict the fields returned in the same way as forDns.getProject(Dns.ProjectOption...)
. CallingBatchResult.get()
on the return value yields the createdProjectInfo
if successful and throws aDnsException
if the operation failed.
-
listRecordSets
public DnsBatchResult<com.google.api.gax.paging.Page<RecordSet>> listRecordSets(String zoneName, Dns.RecordSetListOption... options)
Adds a request representing the "list record sets" operation in the zone specified byzoneName
to this batch. Theoptions
can be used to restrict the fields returned or provide page size limits in the same way as forDns.listRecordSets(String, Dns.RecordSetListOption...)
. CallingBatchResult.get()
on the return value yields a page of record sets if successful and throws aDnsException
if the operation failed or the zone does not exist.
-
listChangeRequests
public DnsBatchResult<com.google.api.gax.paging.Page<ChangeRequest>> listChangeRequests(String zoneName, Dns.ChangeRequestListOption... options)
Adds a request representing the "list change requests" operation in the zone specified byzoneName
to this batch. Theoptions
can be used to restrict the fields returned or provide page size limits in the same way as forDns.listChangeRequests(String, Dns.ChangeRequestListOption...)
. CallingBatchResult.get()
on the return value yields a page of change requests if successful and throws aDnsException
if the operation failed or the zone does not exist.
-
getChangeRequest
public DnsBatchResult<ChangeRequest> getChangeRequest(String zoneName, String changeRequestId, Dns.ChangeRequestOption... options)
Adds a request representing the "get change request" operation for the zone specified byzoneName
to this batch. Theoptions
can be used to restrict the fields returned in the same way as forDns.getChangeRequest(String, String, Dns.ChangeRequestOption...)
. CallingBatchResult.get()
on the return value yields the requestedChangeRequest
if successful,null
if the change request does not exist, or throws aDnsException
if the operation failed or the zone does not exist.
-
applyChangeRequest
public DnsBatchResult<ChangeRequest> applyChangeRequest(String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption... options)
Adds a request representing the "apply change request" operation to the zone specified byzoneName
to this batch. Theoptions
can be used to restrict the fields returned in the same way as forDns.applyChangeRequest(String, ChangeRequestInfo, Dns.ChangeRequestOption...)
. CallingBatchResult.get()
on the return value yields the createdChangeRequest
if successful or throws aDnsException
if the operation failed or the zone does not exist.
-
submit
public void submit()
Submits this batch for processing using a single RPC request.
-
-