Interface CDNApi
-
- All Superinterfaces:
AutoCloseable,Closeable
@Beta @Consumes("application/json") public interface CDNApi extends CloseableProvides access to the Rackspace Cloud Files CDN API features.NOTE
Before a container can be CDN enabled, it must exist in the storage system. To CDN enable the container, perform PUT request against it using thepublicURLnoted in the service catalog for Cloud Files during Authentication and set theX-CDN-Enabledheader totrue.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandisable(String containerName)Disables theCDNContainer.URIenable(String containerName)Enables theCDNContainer.URIenable(String containerName, int ttl)Enables theCDNContainerwith a TTL.CDNContainerget(String containerName)Gets the specified CDN Container.com.google.common.collect.FluentIterable<CDNContainer>list()Lists up to 10,000 CDN containers.com.google.common.collect.FluentIterable<CDNContainer>list(ListCDNContainerOptions options)Lists CDN containers, with the given options.booleanpurgeObject(String containerName, String objectName, Iterable<String> emails)Purges an object from the CDN.booleanupdate(String containerName, UpdateCDNContainerOptions options)Updates a CDN container with the suppliedUpdateCDNContainerOptionsoptions.
-
-
-
Method Detail
-
list
@Named("cdn:list") @GET @Path("/") com.google.common.collect.FluentIterable<CDNContainer> list()Lists up to 10,000 CDN containers.- Returns:
- a list of CDN enabled containers ordered by name.
-
list
@Named("cdn:list") @GET @Path("/") com.google.common.collect.FluentIterable<CDNContainer> list(ListCDNContainerOptions options)Lists CDN containers, with the given options.- Parameters:
options- the options to control output.- Returns:
- a list of CDN enabled containers ordered by name.
-
get
@Named("cdn:get") @HEAD @Path("/{container}") @Nullable CDNContainer get(@PathParam("container") String containerName)Gets the specified CDN Container.- Parameters:
containerName- the name of the CDN Container- Returns:
- the CDNContainer or null, if not found.
-
enable
@Named("cdn:enable") @PUT @Path("/{containerName}") @Nullable URI enable(@PathParam("containerName") String containerName)Enables theCDNContainer.- Parameters:
containerName- corresponds toCDNContainer.getName().- Returns:
- the CDN container
URIornull, if not found.
-
enable
@Named("cdn:enable") @PUT @Path("/{containerName}") @Nullable URI enable(@PathParam("containerName") String containerName, @HeaderParam("X-Ttl") int ttl)Enables theCDNContainerwith a TTL.- Parameters:
containerName- corresponds toCDNContainer.getName().ttl- the TTL for the CDN Container.- Returns:
- the CDN container
URIornull, if not found.
-
disable
@Named("cdn:disable") @PUT @Path("/{containerName}") boolean disable(@PathParam("containerName") String containerName)Disables theCDNContainer.- Parameters:
containerName- corresponds toCDNContainer.getName().- Returns:
trueif the container was disabled,falseif not.
-
purgeObject
@Named("cdn:purge") @DELETE @Path("/{containerName}/{objectName}") boolean purgeObject(@PathParam("containerName") String containerName, @PathParam("objectName") String objectName, Iterable<String> emails)Purges an object from the CDN.- Parameters:
containerName- corresponds toCDNContainer.getName().objectName- the object in theCDNContainerto purge.emails- the email addresses to notify after purging.- Returns:
trueif the object was successfully purged,falseif not.
-
update
@Named("cdn:update") @POST @Path("/{containerName}") boolean update(@PathParam("containerName") String containerName, UpdateCDNContainerOptions options)Updates a CDN container with the suppliedUpdateCDNContainerOptionsoptions.- Parameters:
containerName- corresponds toCDNContainer.getName().options- theUpdateCDNContainerOptionsoptions.
-
-