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 byzoneNameto 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 byzoneNameto 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 byzoneNameto 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 byzoneNameto 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.voidsubmit()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. Theoptionscan 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 aDnsExceptionotherwise.
-
createZone
public DnsBatchResult<Zone> createZone(ZoneInfo zone, Dns.ZoneOption... options)
Adds a request representing the "create zone" operation to this batch. Theoptionscan 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 createdZoneif successful and throws aDnsExceptionotherwise.
-
deleteZone
public DnsBatchResult<Boolean> deleteZone(String zoneName)
Adds a request representing the "delete zone" operation to this batch. CallingBatchResult.get()on the return value yieldstrueupon successful deletion,falseif the zone was not found, or throws aDnsExceptionif the operation failed.
-
getZone
public DnsBatchResult<Zone> getZone(String zoneName, Dns.ZoneOption... options)
Adds a request representing the "get zone" operation to this batch. Theoptionscan 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 requestedZoneif successful,nullif no such zone exists, or throws aDnsExceptionif the operation failed.
-
getProject
public DnsBatchResult<ProjectInfo> getProject(Dns.ProjectOption... options)
Adds a request representing the "get project" operation to this batch. Theoptionscan be used to restrict the fields returned in the same way as forDns.getProject(Dns.ProjectOption...). CallingBatchResult.get()on the return value yields the createdProjectInfoif successful and throws aDnsExceptionif 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 byzoneNameto this batch. Theoptionscan 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 aDnsExceptionif 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 byzoneNameto this batch. Theoptionscan 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 aDnsExceptionif 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 byzoneNameto this batch. Theoptionscan 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 requestedChangeRequestif successful,nullif the change request does not exist, or throws aDnsExceptionif 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 byzoneNameto this batch. Theoptionscan 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 createdChangeRequestif successful or throws aDnsExceptionif the operation failed or the zone does not exist.
-
submit
public void submit()
Submits this batch for processing using a single RPC request.
-
-