Class DnsBatch (2.33.0)

public class DnsBatch

A batch of operations to be submitted to Google Cloud DNS using a single RPC request.

Inheritance

java.lang.Object > DnsBatch

Methods

applyChangeRequest(String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption[] options)

public DnsBatchResult<ChangeRequest> applyChangeRequest(String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption[] options)

Adds a request representing the "apply change request" operation to the zone specified by zoneName to this batch. The options can be used to restrict the fields returned in the same way as for Dns#applyChangeRequest(String, ChangeRequestInfo, Dns.ChangeRequestOption...). Calling DnsBatchResult#get() on the return value yields the created ChangeRequest if successful or throws a DnsException if the operation failed or the zone does not exist.

Parameters
NameDescription
zoneNameString
changeRequestChangeRequestInfo
optionsChangeRequestOption[]
Returns
TypeDescription
DnsBatchResult<ChangeRequest>

createZone(ZoneInfo zone, Dns.ZoneOption[] options)

public DnsBatchResult<Zone> createZone(ZoneInfo zone, Dns.ZoneOption[] options)

Adds a request representing the "create zone" operation to this batch. The options can be used to restrict the fields returned in the same way as for Dns#create(ZoneInfo, Dns.ZoneOption...). Calling DnsBatchResult#get() on the return value yields the created Zone if successful and throws a DnsException otherwise.

Parameters
NameDescription
zoneZoneInfo
optionsZoneOption[]
Returns
TypeDescription
DnsBatchResult<Zone>

deleteZone(String zoneName)

public DnsBatchResult<Boolean> deleteZone(String zoneName)

Adds a request representing the "delete zone" operation to this batch. Calling DnsBatchResult#get() on the return value yields true upon successful deletion, false if the zone was not found, or throws a DnsException if the operation failed.

Parameter
NameDescription
zoneNameString
Returns
TypeDescription
DnsBatchResult<Boolean>

getChangeRequest(String zoneName, String changeRequestId, Dns.ChangeRequestOption[] options)

public DnsBatchResult<ChangeRequest> getChangeRequest(String zoneName, String changeRequestId, Dns.ChangeRequestOption[] options)

Adds a request representing the "get change request" operation for the zone specified by zoneName to this batch. The options can be used to restrict the fields returned in the same way as for Dns#getChangeRequest(String, String, Dns.ChangeRequestOption...). Calling DnsBatchResult#get() on the return value yields the requested ChangeRequest if successful, null if the change request does not exist, or throws a DnsException if the operation failed or the zone does not exist.

Parameters
NameDescription
zoneNameString
changeRequestIdString
optionsChangeRequestOption[]
Returns
TypeDescription
DnsBatchResult<ChangeRequest>

getProject(Dns.ProjectOption[] options)

public DnsBatchResult<ProjectInfo> getProject(Dns.ProjectOption[] options)

Adds a request representing the "get project" operation to this batch. The options can be used to restrict the fields returned in the same way as for Dns#getProject(Dns.ProjectOption...). Calling DnsBatchResult#get() on the return value yields the created ProjectInfo if successful and throws a DnsException if the operation failed.

Parameter
NameDescription
optionsProjectOption[]
Returns
TypeDescription
DnsBatchResult<ProjectInfo>

getZone(String zoneName, Dns.ZoneOption[] options)

public DnsBatchResult<Zone> getZone(String zoneName, Dns.ZoneOption[] options)

Adds a request representing the "get zone" operation to this batch. The options can be used to restrict the fields returned in the same way as for Dns#getZone(String, Dns.ZoneOption...). Calling DnsBatchResult#get() on the return value yields the requested Zone if successful, null if no such zone exists, or throws a DnsException if the operation failed.

Parameters
NameDescription
zoneNameString
optionsZoneOption[]
Returns
TypeDescription
DnsBatchResult<Zone>

listChangeRequests(String zoneName, Dns.ChangeRequestListOption[] options)

public DnsBatchResult<Page<ChangeRequest>> listChangeRequests(String zoneName, Dns.ChangeRequestListOption[] options)

Adds a request representing the "list change requests" operation in the zone specified by zoneName to this batch. The options can be used to restrict the fields returned or provide page size limits in the same way as for Dns#listChangeRequests(String, Dns.ChangeRequestListOption...). Calling DnsBatchResult#get() on the return value yields a page of change requests if successful and throws a DnsException if the operation failed or the zone does not exist.

Parameters
NameDescription
zoneNameString
optionsChangeRequestListOption[]
Returns
TypeDescription
DnsBatchResult<Page<ChangeRequest>>

listRecordSets(String zoneName, Dns.RecordSetListOption[] options)

public DnsBatchResult<Page<RecordSet>> listRecordSets(String zoneName, Dns.RecordSetListOption[] options)

Adds a request representing the "list record sets" operation in the zone specified by zoneName to this batch. The options can be used to restrict the fields returned or provide page size limits in the same way as for Dns#listRecordSets(String, Dns.RecordSetListOption...). Calling DnsBatchResult#get() on the return value yields a page of record sets if successful and throws a DnsException if the operation failed or the zone does not exist.

Parameters
NameDescription
zoneNameString
optionsRecordSetListOption[]
Returns
TypeDescription
DnsBatchResult<Page<RecordSet>>

listZones(Dns.ZoneListOption[] options)

public DnsBatchResult<Page<Zone>> listZones(Dns.ZoneListOption[] options)

Adds a request representing the "list zones" operation to this batch. The options can be used to restrict the fields returned or provide page size limits in the same way as for Dns#listZones(Dns.ZoneListOption...). Calling DnsBatchResult#get() on the return value yields a page of zones if successful and throws a DnsException otherwise.

Parameter
NameDescription
optionsZoneListOption[]
Returns
TypeDescription
DnsBatchResult<Page<Zone>>

submit()

public void submit()

Submits this batch for processing using a single RPC request.