@Beta
@Consumes(value="application/json")
public interface ContainerApi
org.jclouds.openstack.swift.SwiftClient in jclouds 2.0 and it is recommended you adopt it sooner than later.| Modifier and Type | Method and Description |
|---|---|
boolean |
create(String containerName)
Creates a container, if not already present.
|
boolean |
create(String containerName,
CreateContainerOptions options)
Creates a container, if not already present.
|
boolean |
deleteIfEmpty(String containerName)
Deletes a
Container, if empty. |
boolean |
deleteMetadata(String containerName,
Map<String,String> metadata)
Deletes
Container metadata. |
Container |
get(String containerName)
Gets the
Container. |
com.google.common.collect.FluentIterable<Container> |
list()
Lists up to 10,000 containers.
|
com.google.common.collect.FluentIterable<Container> |
list(ListContainerOptions options)
Lists containers with the supplied
ListContainerOptions. |
void |
update(String containerName,
UpdateContainerOptions options)
Updates the
Container. |
void |
updateMetadata(String containerName,
Map<String,String> metadata)
Creates or updates the
Container metadata. |
@Named(value="container:list") @GET com.google.common.collect.FluentIterable<Container> list()
Container objects without metadata. To retrieve
the Container metadata, use the get(String) method.
containers ordered by name.@Named(value="container:list") @GET com.google.common.collect.FluentIterable<Container> list(ListContainerOptions options)
ListContainerOptions.
Container objects without metadata. To retrieve
the Container metadata, use the get(String) method.
options - the options to control the output list.containers ordered by name.@Named(value="container:create")
@PUT
@Path(value="/{containerName}")
boolean create(@PathParam(value="containerName")
String containerName)
containerName - corresponds to Container.getName().true if the container was created, false if the container already existed.@Named(value="container:create")
@PUT
@Path(value="/{containerName}")
boolean create(@PathParam(value="containerName")
String containerName,
CreateContainerOptions options)
containerName - corresponds to Container.getName().options - the options to use when creating the container.true if the container was created, false if the container already existed.@Named(value="container:get")
@HEAD
@Path(value="/{containerName}")
@Nullable
Container get(@PathParam(value="containerName")
String containerName)
Container.containerName - corresponds to Container.getName().Container, or null if not found.@Named(value="container:update")
@POST
@Path(value="/{containerName}")
void update(@PathParam(value="containerName")
String containerName,
UpdateContainerOptions options)
Container.containerName - the container name corresponding to Container.getName().options - the container options to update.@Named(value="container:updateMetadata")
@POST
@Path(value="/{containerName}")
void updateMetadata(@PathParam(value="containerName")
String containerName,
Map<String,String> metadata)
Container metadata.containerName - the container name corresponding to Container.getName().metadata - the container metadata to create or update.@Named(value="container:deleteMetadata")
@POST
@Path(value="/{containerName}")
boolean deleteMetadata(@PathParam(value="containerName")
String containerName,
Map<String,String> metadata)
Container metadata.containerName - corresponds to Container.getName().metadata - the container metadata to delete.true if the container metadata was successfully deleted,
false if not.@Named(value="container:deleteIfEmpty")
@DELETE
@Path(value="/{containerName}")
boolean deleteIfEmpty(@PathParam(value="containerName")
String containerName)
throws IllegalStateException
Container, if empty.containerName - corresponds to Container.getName().true if the container was deleted or not present.IllegalStateException - if the container was not empty.Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.