Interface Dns
-
- All Superinterfaces:
com.google.cloud.Service<DnsOptions>
public interface Dns extends com.google.cloud.Service<DnsOptions>
An interface for the Google Cloud DNS service.- See Also:
- Google Cloud DNS
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDns.ChangeRequestFieldThe fields of a change request.static classDns.ChangeRequestListOptionClass for specifying change request listing options.static classDns.ChangeRequestOptionClass for specifying change request field options.static classDns.ProjectFieldThe fields of a project.static classDns.ProjectOptionClass for specifying project options.static classDns.RecordSetFieldThe fields of a record set.static classDns.RecordSetListOptionClass for specifying record set listing options.static classDns.SortingOrderThe sorting order for listing.static classDns.ZoneFieldThe fields of a zone.static classDns.ZoneListOptionClass for specifying zone listing options.static classDns.ZoneOptionClass for specifying zone field options.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChangeRequestapplyChangeRequest(String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption... options)Submits a change request for the specified zone.DnsBatchbatch()Creates a new empty batch for grouping multiple service calls in one underlying RPC call.Zonecreate(ZoneInfo zoneInfo, Dns.ZoneOption... options)Creates a new zone.booleandelete(String zoneName)Deletes an existing zone identified by name.ChangeRequestgetChangeRequest(String zoneName, String changeRequestId, Dns.ChangeRequestOption... options)Retrieves updated information about a change request previously submitted for a zone identified by ID.ProjectInfogetProject(Dns.ProjectOption... fields)Retrieves the information about the current project.ZonegetZone(String zoneName, Dns.ZoneOption... options)Returns the zone by the specified zone name.com.google.api.gax.paging.Page<ChangeRequest>listChangeRequests(String zoneName, Dns.ChangeRequestListOption... options)Lists the change requests for the zone identified by name that were submitted to the service.com.google.api.gax.paging.Page<RecordSet>listRecordSets(String zoneName, Dns.RecordSetListOption... options)Lists the record sets in the zone identified by name.com.google.api.gax.paging.Page<Zone>listZones(Dns.ZoneListOption... options)Lists the zones inside the project.
-
-
-
Method Detail
-
create
Zone create(ZoneInfo zoneInfo, Dns.ZoneOption... options)
Creates a new zone.Returns
Zoneobject representing the new zone's information. In addition to the name, dns name and description (supplied by the user within thezoneInfoparameter), the returned object can include the following read-only fields supplied by the server: creation time, id, and list of name servers. The returned fields can be optionally restricted by specifyingDns.ZoneOptions.- Throws:
DnsException- upon failure- See Also:
- Cloud DNS Managed Zones: create
-
getZone
Zone getZone(String zoneName, Dns.ZoneOption... options)
Returns the zone by the specified zone name. Returnsnullif the zone is not found. The returned fields can be optionally restricted by specifyingDns.ZoneOptions.- Throws:
DnsException- upon failure- See Also:
- Cloud DNS Managed Zones: get
-
listZones
com.google.api.gax.paging.Page<Zone> listZones(Dns.ZoneListOption... options)
Lists the zones inside the project.This method returns zones in an unspecified order. New zones do not necessarily appear at the end of the list. Use
Dns.ZoneListOptionto restrict the listing to a domain name, set page size, and set page token.- Returns:
- a page of zones
- Throws:
DnsException- upon failure- See Also:
- Cloud DNS Managed Zones: list
-
delete
boolean delete(String zoneName)
Deletes an existing zone identified by name. Returnstrueif the zone was successfully deleted andfalseotherwise.- Returns:
trueif zone was found and deleted andfalseotherwise- Throws:
DnsException- upon failure- See Also:
- Cloud DNS Managed Zones: delete
-
listRecordSets
com.google.api.gax.paging.Page<RecordSet> listRecordSets(String zoneName, Dns.RecordSetListOption... options)
Lists the record sets in the zone identified by name.The fields to be returned, page size and page tokens can be specified using
Dns.RecordSetListOptions.- Throws:
DnsException- upon failure or if the zone cannot be found- See Also:
- Cloud DNS ResourceRecordSets: list
-
getProject
ProjectInfo getProject(Dns.ProjectOption... fields)
Retrieves the information about the current project. The returned fields can be optionally restricted by specifyingDns.ProjectOptions.- Throws:
DnsException- upon failure- See Also:
- Cloud DNS Projects: get
-
applyChangeRequest
ChangeRequest applyChangeRequest(String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption... options)
Submits a change request for the specified zone. The returned object contains the following read-only fields supplied by the server: id, start time and status. time, id, and list of name servers. The fields to be returned can be selected byDns.ChangeRequestOptions.- Returns:
- the new
ChangeRequest - Throws:
DnsException- upon failure or if zone is not found- See Also:
- Cloud DNS Changes: create
-
getChangeRequest
ChangeRequest getChangeRequest(String zoneName, String changeRequestId, Dns.ChangeRequestOption... options)
Retrieves updated information about a change request previously submitted for a zone identified by ID. Returnsnullif the request cannot be found and throws an exception if the zone does not exist. The fields to be returned using can be specified usingDns.ChangeRequestOptions.- Throws:
DnsException- upon failure or if the zone cannot be found- See Also:
- Cloud DNS Chages: get
-
listChangeRequests
com.google.api.gax.paging.Page<ChangeRequest> listChangeRequests(String zoneName, Dns.ChangeRequestListOption... options)
Lists the change requests for the zone identified by name that were submitted to the service.The sorting order for changes (based on when they were received by the server), fields to be returned, page size and page token can be specified using
Dns.ChangeRequestListOptions.- Returns:
- A page of change requests
- Throws:
DnsException- upon failure or if the zone cannot be found- See Also:
- Cloud DNS Chages: list
-
batch
DnsBatch batch()
Creates a new empty batch for grouping multiple service calls in one underlying RPC call.
-
-