@Consumes(value="application/json")
@Path(value="/v{jclouds.api-version}")
public interface ContainerApi
| Modifier and Type | Method and Description |
|---|---|
InputStream |
attach(String containerId) |
InputStream |
attach(String containerId,
AttachOptions options) |
Image |
commit()
Create a new image from a container’s changes
|
Image |
commit(CommitOptions options)
Create a new image from a container’s changes
|
InputStream |
copy(String containerId,
Resource resource) |
Container |
createContainer(String name,
Config config) |
Container |
inspectContainer(String containerId)
Return low-level information on the container id
|
void |
kill(String containerId) |
void |
kill(String containerId,
int signal) |
void |
kill(String containerId,
String signal) |
List<ContainerSummary> |
listContainers() |
List<ContainerSummary> |
listContainers(ListContainerOptions options) |
void |
pause(String containerId) |
void |
removeContainer(String containerId) |
void |
removeContainer(String containerId,
RemoveContainerOptions options) |
void |
restart(String containerId) |
void |
restart(String containerId,
int secondsToWait) |
void |
startContainer(String containerId) |
void |
startContainer(String containerId,
HostConfig hostConfig) |
void |
stopContainer(String containerId) |
void |
stopContainer(String containerId,
int secondsToWait) |
void |
unpause(String containerId) |
StatusCode |
wait(String containerId)
Block until container @param containerId stops, then returns the exit code
|
@Named(value="containers:list") @GET @Path(value="/containers/json") List<ContainerSummary> listContainers()
@Named(value="containers:list") @GET @Path(value="/containers/json") List<ContainerSummary> listContainers(ListContainerOptions options)
options - the options to list the containers (@see ListContainerOptions)@Named(value="container:create") @POST @Path(value="/containers/create") Container createContainer(@QueryParam(value="name") String name, Config config)
name - the name for the new container. Must match /?[a-zA-Z0-9_-]+.config - the container’s configuration (@see BindToJsonPayload)@Named(value="container:inspect")
@GET
@Path(value="/containers/{id}/json")
Container inspectContainer(@PathParam(value="id")
String containerId)
containerId - The id of the container to get.null if the container with the given id doesn't exist.@Named(value="container:delete")
@DELETE
@Path(value="/containers/{id}")
void removeContainer(@PathParam(value="id")
String containerId)
containerId - The id of the container to be removed.@Named(value="container:delete")
@DELETE
@Path(value="/containers/{id}")
void removeContainer(@PathParam(value="id")
String containerId,
RemoveContainerOptions options)
containerId - The id of the container to be removed.options - the operation’s configuration (@see RemoveContainerOptions)@Named(value="container:start")
@POST
@Path(value="/containers/{id}/start")
void startContainer(@PathParam(value="id")
String containerId)
containerId - The id of the container to be started.@Named(value="container:start")
@POST
@Path(value="/containers/{id}/start")
void startContainer(@PathParam(value="id")
String containerId,
HostConfig hostConfig)
containerId - The id of the container to be started.hostConfig - the container’s host configuration@Named(value="container:stop")
@POST
@Path(value="/containers/{id}/stop")
void stopContainer(@PathParam(value="id")
String containerId)
containerId - The id of the container to be stopped.@Named(value="container:stop")
@POST
@Path(value="/containers/{id}/stop")
void stopContainer(@PathParam(value="id")
String containerId,
@QueryParam(value="t")
int secondsToWait)
@Named(value="container:commit") @POST @Path(value="/commit") Image commit()
@Named(value="container:commit") @POST @Path(value="/commit") Image commit(CommitOptions options)
options - the commit’s configuration (@see CommitOptions)@Named(value="container:pause")
@POST
@Path(value="/containers/{id}/pause")
void pause(@PathParam(value="id")
String containerId)
containerId - The id of the container to be paused.@Named(value="container:unpause")
@POST
@Path(value="/containers/{id}/unpause")
void unpause(@PathParam(value="id")
String containerId)
containerId - The id of the container to be unpaused.@Named(value="container:attach")
@POST
@Path(value="/containers/{id}/attach")
InputStream attach(@PathParam(value="id")
String containerId)
containerId - The id of the container to be attached.@Named(value="container:attach")
@POST
@Path(value="/containers/{id}/attach")
InputStream attach(@PathParam(value="id")
String containerId,
AttachOptions options)
containerId - The id of the container to be attached.options - the attach options @see org.jclouds.docker.options.AttachOptions@Named(value="container:wait")
@POST
@Path(value="/containers/{id}/wait")
StatusCode wait(@PathParam(value="id")
String containerId)
@Named(value="container:restart")
@POST
@Path(value="/containers/{id}/restart")
void restart(@PathParam(value="id")
String containerId)
containerId - restarts@Named(value="container:restart")
@POST
@Path(value="/containers/{id}/restart")
void restart(@PathParam(value="id")
String containerId,
@QueryParam(value="t")
int secondsToWait)
@Named(value="container:kill")
@POST
@Path(value="/containers/{id}/kill")
void kill(@PathParam(value="id")
String containerId)
containerId - to be killed@Named(value="container:kill")
@POST
@Path(value="/containers/{id}/kill")
void kill(@PathParam(value="id")
String containerId,
@QueryParam(value="signal")
int signal)
containerId - to be killedsignal - Signal to send to the container. When not set, SIGKILL is assumed and the call will waits for the
container to exit.@Named(value="container:kill")
@POST
@Path(value="/containers/{id}/kill")
void kill(@PathParam(value="id")
String containerId,
@QueryParam(value="signal")
String signal)
containerId - to be killedsignal - Signal string like "SIGINT" to send to the container. When not set, SIGKILL is assumed and the call will waits for
the container to exit.@Named(value="container:copy")
@POST
@Path(value="/containers/{id}/copy")
InputStream copy(@PathParam(value="id")
String containerId,
Resource resource)
containerId - id of the container to copy files fromCopyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.