Interface DomainApi


  • public interface DomainApi
    • Method Detail

      • create

        @Named("domain:create")
        @POST
        @Consumes("application/json")
        @Path("/domains")
        Job<Set<Domain>> create​(Iterable<CreateDomain> createDomains)
        Provisions one or more new DNS domains based on the configuration defined in CreateDomain. If the domain creation cannot be fulfilled due to insufficient or invalid data, Job with an ERROR status will be returned with information regarding the nature of the failure in the body of the Job. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure. This is an atomic operation: if there is a failure in creation of even a single record, the entire process will fail.

        When a domain is created, and no Time To Live (TTL) is specified, the SOA minTTL (3600 seconds) is used as the default. When a record is added without a specified TTL, it will receive the domain TTL by default. When the domain and/or record TTL is supplied by the user, either via a create or update call, the TTL values must be 300 seconds or more.

        To wait for this call to complete use JobPredicates.awaitComplete(CloudDNSApi, Job).
      • list

        @Named("domain:list")
        @GET
        @Consumes("application/json")
        @Path("/domains")
        PagedIterable<Domain> list()
        The resulting list is flat, and does not break the domains down hierarchically by subdomain. All representative domains are included in the list, even if a domain is conceptually a subdomain of another domain in the list. Records are not included.
      • listWithFilterByNamesMatching

        @Named("domain:list")
        @GET
        @Consumes("application/json")
        @Path("/domains")
        PagedIterable<Domain> listWithFilterByNamesMatching​(@QueryParam("name")
                                                            String nameFilter)
        Filtering the search to limit the results returned can be performed by using the nameFilter parameter. For example, "hoola.com" matches hoola.com and similar names such as main.hoola.com and sub.hoola.com.

        Filter criteria may consist of:
        • Any letter (A-Za-z)
        • Numbers (0-9)
        • Hyphen ("-")
        • 1 to 63 characters
        Filter criteria should not include any of the following characters: ' + , | ! " £ $ % & / ( ) = ? ^ * ç ° § ; : _ > ] [ @ à, é, ò
      • list

        @Named("domain:list")
        @GET
        @Consumes("application/json")
        @Path("/domains")
        PaginatedCollection<Domain> list​(PaginationOptions options)
        The resulting list is flat, and does not break the domains down hierarchically by subdomain.
      • listSubdomains

        @Named("domain:list")
        @GET
        @Consumes("application/json")
        @Path("/domains/{domainId}/subdomains")
        @Nullable
        PagedIterable<Subdomain> listSubdomains​(@PathParam("domainId")
                                                int domainId)
        List the subdomains of a domain.
      • listSubdomains

        @Named("domain:list")
        @GET
        @Consumes("application/json")
        @Path("/domains/{domainId}/subdomains")
        PaginatedCollection<Subdomain> listSubdomains​(@PathParam("domainId")
                                                      int domainId,
                                                      PaginationOptions options)
        List the subdomains of a domain and manually control pagination.
      • listChanges

        @Named("domain:list")
        @GET
        @Consumes("application/json")
        @Path("/domains/{id}/changes")
        @Nullable
        DomainChange listChanges​(@PathParam("id")
                                 int id,
                                 @QueryParam("changes")
                                 Date since)
        Shows all changes to the specified domain since the specified date/time.
      • get

        @Named("domain:get")
        @GET
        @Consumes("application/json")
        @Path("/domains/{id}")
        @Nullable
        Domain get​(@PathParam("id")
                   int id)
        Get all information for a Domain, including records and subdomains.
      • update

        @Named("domain:update")
        @PUT
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/domains/{id}")
        Job<Void> update​(@PathParam("id")
                         int id,
                         UpdateDomain updateDomain)
        This call modifies the domain attributes only. Records cannot be added, modified, or removed.

        To wait for this call to complete use JobPredicates.awaitComplete(CloudDNSApi, Job).
        See Also:
        RecordApi
      • delete

        @Named("domain:delete")
        @DELETE
        @Path("/domains")
        @Consumes("*/*")
        Job<Void> delete​(@QueryParam("id")
                         Iterable<Integer> ids,
                         @QueryParam("deleteSubdomains")
                         boolean deleteSubdomains)
        This call removes one or more specified domains from the account; when a domain is deleted, its immediate resource records are also deleted from the account. By default, if a deleted domain had subdomains, each subdomain becomes a root domain and is not deleted; this can be overridden by the optional deleteSubdomains parameter. Utilizing the optional deleteSubdomains parameter on domains without subdomains does not result in a failure. When a domain is deleted, any and all domain data is immediately purged and is not recoverable via the API.

        To wait for this call to complete use JobPredicates.awaitComplete(CloudDNSApi, Job).
      • exportFormat

        @Named("domain:export")
        @GET
        @Consumes("application/json")
        @Path("/domains/{id}/export")
        Job<List<String>> exportFormat​(@PathParam("id")
                                       int id,
                                       Domain.Format format)
        This call provides the BIND (Berkeley Internet Name Domain) 9 formatted contents of the requested domain. This call is for a single domain only, and as such, does not traverse up or down the domain hierarchy for details (that is, no subdomain information is provided).

        To wait for this call to complete use JobPredicates.awaitComplete(CloudDNSApi, Job).
      • importFormat

        @Named("domain:import")
        @POST
        @Produces("application/json")
        @Consumes("application/json")
        @Path("/domains/import")
        Job<Domain> importFormat​(List<String> contents,
                                 Domain.Format format)
        This call provisions a new DNS domain under the account specified by the BIND 9 formatted file configuration contents. If the corresponding request cannot be fulfilled due to insufficient or invalid data, an exception will be thrown with information regarding the nature of the failure in the body of the response. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure and call again.

        To wait for this call to complete use JobPredicates.awaitComplete(CloudDNSApi, Job).