@Consumes(value="application/json")
@Produces(value="application/json")
public interface CloudPoolRestApi
CloudPool REST API. For additional details, refer to the
official cloud
pool API documentation.| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
attachMachine(String machineId)
Attaches an already running machine instance to the pool, growing the
pool with a new member.
|
javax.ws.rs.core.Response |
detachMachine(String machineId,
DetachMachineRequest request)
Removes a member from the pool without terminating it.
|
javax.ws.rs.core.Response |
getConfig()
Retrieves the configuration currently set for the
CloudPool. |
javax.ws.rs.core.Response |
getPool()
Retrieves the current machine pool members.
|
javax.ws.rs.core.Response |
getPoolSize()
Returns the current size of the machine pool -- both in terms of the
desired size and the actual size (as these may differ at any time).
|
javax.ws.rs.core.Response |
getStatus()
Retrieves the execution status for the cloud pool.
|
javax.ws.rs.core.Response |
setConfig(com.google.gson.JsonObject configuration)
Sets the configuration for the
CloudPool. |
javax.ws.rs.core.Response |
setDesiredSize(SetDesiredSizeRequest request)
Sets the desired number of machines in the machine pool.
|
javax.ws.rs.core.Response |
setMembershipStatus(String machineId,
SetMembershipStatusRequest request)
Sets the membership status of a given pool member.
|
javax.ws.rs.core.Response |
setServiceState(String machineId,
SetServiceStateRequest request)
Sets the service state of a given machine pool member.
|
javax.ws.rs.core.Response |
start()
Starts the cloud pool.
|
javax.ws.rs.core.Response |
stop()
Stops the cloud pool.
|
javax.ws.rs.core.Response |
terminateMachine(String machineId,
TerminateMachineRequest request)
Terminates a particular machine pool member.
|
@GET @Path(value="/config") javax.ws.rs.core.Response getConfig()
CloudPool.
More details can be found in the official API
documentation.@POST @Path(value="/config") javax.ws.rs.core.Response setConfig(com.google.gson.JsonObject configuration)
CloudPool.
More details can be found in the official API
documentation.configuration - The (JSON) configuration document to set.@POST @Path(value="/start") javax.ws.rs.core.Response start()
@POST @Path(value="/stop") javax.ws.rs.core.Response stop()
@GET @Path(value="/status") javax.ws.rs.core.Response getStatus()
@GET @Path(value="/pool") javax.ws.rs.core.Response getPool()
@POST @Path(value="/pool/size") javax.ws.rs.core.Response setDesiredSize(SetDesiredSizeRequest request)
request - A SetDesiredSizeRequest.@GET @Path(value="/pool/size") javax.ws.rs.core.Response getPoolSize()
@POST
@Path(value="/pool/{machine}/terminate")
javax.ws.rs.core.Response terminateMachine(@PathParam(value="machine")
String machineId,
TerminateMachineRequest request)
machineId - The identifier of the machine to terminate.request - A TerminateMachineRequest.@POST
@Path(value="/pool/{machine}/detach")
javax.ws.rs.core.Response detachMachine(@PathParam(value="machine")
String machineId,
DetachMachineRequest request)
machineId - The identifier of the machine to detach from the pool.request - A DetachMachineRequest.@POST
@Path(value="/pool/{machine}/attach")
javax.ws.rs.core.Response attachMachine(@PathParam(value="machine")
String machineId)
machineId - The identifier of the machine to attach to the pool.@POST
@Path(value="/pool/{machine}/serviceState")
javax.ws.rs.core.Response setServiceState(@PathParam(value="machine")
String machineId,
SetServiceStateRequest request)
machineId - The machine whose service state is to be set.request - A SetServiceStateRequest.@POST
@Path(value="/pool/{machine}/membershipStatus")
javax.ws.rs.core.Response setMembershipStatus(@PathParam(value="machine")
String machineId,
SetMembershipStatusRequest request)
machineId - The machine whose service state is to be set.request - A SetMembershipStatusRequest.Copyright © 2011–2017 Elastisys. All rights reserved.