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 class
Dns.ChangeRequestField
The fields of a change request.static class
Dns.ChangeRequestListOption
Class for specifying change request listing options.static class
Dns.ChangeRequestOption
Class for specifying change request field options.static class
Dns.ProjectField
The fields of a project.static class
Dns.ProjectOption
Class for specifying project options.static class
Dns.RecordSetField
The fields of a record set.static class
Dns.RecordSetListOption
Class for specifying record set listing options.static class
Dns.SortingOrder
The sorting order for listing.static class
Dns.ZoneField
The fields of a zone.static class
Dns.ZoneListOption
Class for specifying zone listing options.static class
Dns.ZoneOption
Class for specifying zone field options.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChangeRequest
applyChangeRequest(String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption... options)
Submits a change request for the specified zone.DnsBatch
batch()
Creates a new empty batch for grouping multiple service calls in one underlying RPC call.Zone
create(ZoneInfo zoneInfo, Dns.ZoneOption... options)
Creates a new zone.boolean
delete(String zoneName)
Deletes an existing zone identified by name.ChangeRequest
getChangeRequest(String zoneName, String changeRequestId, Dns.ChangeRequestOption... options)
Retrieves updated information about a change request previously submitted for a zone identified by ID.ProjectInfo
getProject(Dns.ProjectOption... fields)
Retrieves the information about the current project.Zone
getZone(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
Zone
object representing the new zone's information. In addition to the name, dns name and description (supplied by the user within thezoneInfo
parameter), 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.ZoneOption
s.- 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. Returnsnull
if the zone is not found. The returned fields can be optionally restricted by specifyingDns.ZoneOption
s.- 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.ZoneListOption
to 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. Returnstrue
if the zone was successfully deleted andfalse
otherwise.- Returns:
true
if zone was found and deleted andfalse
otherwise- 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.RecordSetListOption
s.- 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.ProjectOption
s.- 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.ChangeRequestOption
s.- 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. Returnsnull
if 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.ChangeRequestOption
s.- 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.ChangeRequestListOption
s.- 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.
-
-