Interface CloudPoolRestApi
-
- All Known Implementing Classes:
CloudPoolRestApiImpl
@Consumes("application/json") @Produces("application/json") public interface CloudPoolRestApiTheCloudPoolREST API. For additional details, refer to the official cloud pool API documentation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.ws.rs.core.ResponseattachMachine(AttachMachineRequest request)Attaches an already running machine instance to the pool, growing the pool with a new member.javax.ws.rs.core.ResponsedetachMachine(DetachMachineRequest request)Removes a member from the pool without terminating it.javax.ws.rs.core.ResponsegetConfig()Retrieves the configuration currently set for theCloudPool.javax.ws.rs.core.ResponsegetPool()Retrieves the current machine pool members.javax.ws.rs.core.ResponsegetPoolSize()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.ResponsegetStatus()Retrieves the execution status for the cloud pool.javax.ws.rs.core.ResponsesetConfig(com.google.gson.JsonObject configuration)Sets the configuration for theCloudPool.javax.ws.rs.core.ResponsesetDesiredSize(SetDesiredSizeRequest request)Sets the desired number of machines in the machine pool.javax.ws.rs.core.ResponsesetMembershipStatus(SetMembershipStatusRequest request)Sets the membership status for a given pool member.javax.ws.rs.core.ResponsesetServiceState(SetServiceStateRequest request)Sets the service state for a given machine pool member.javax.ws.rs.core.Responsestart()Starts the cloud pool.javax.ws.rs.core.Responsestop()Stops the cloud pool.javax.ws.rs.core.ResponseterminateMachine(TerminateMachineRequest request)Terminates a particular machine pool member.
-
-
-
Method Detail
-
getConfig
@GET @Path("/config") javax.ws.rs.core.Response getConfig()Retrieves the configuration currently set for theCloudPool. More details can be found in the official API documentation.- Returns:
- A response message as per the cloud pool REST API.
-
setConfig
@POST @Path("/config") javax.ws.rs.core.Response setConfig(com.google.gson.JsonObject configuration)Sets the configuration for theCloudPool. More details can be found in the official API documentation.- Parameters:
configuration- The (JSON) configuration document to set.- Returns:
- A response message as per the cloud pool REST API.
-
start
@POST @Path("/start") javax.ws.rs.core.Response start()Starts the cloud pool. This will set the cloud pool in an activated state where it will start to accept requests to query or modify the machine pool. If the cloud pool has not been configured the method should fail. If the cloud pool is already started this is a no-op. More details can be found in the official API documentation.- Returns:
- A response message as per the cloud pool REST API.
-
stop
@POST @Path("/stop") javax.ws.rs.core.Response stop()Stops the cloud pool. A stopped cloud pool is in a passivated state and will not accept any requests to query or modify the machine pool. If the cloud pool is already in a stopped state this is a no-op. More details can be found in the official API documentation.- Returns:
- A response message as per the cloud pool REST API.
-
getStatus
@GET @Path("/status") javax.ws.rs.core.Response getStatus()Retrieves the execution status for the cloud pool. More details can be found in the official API documentation.- Returns:
- A response message as per the cloud pool REST API.
-
getPool
@GET @Path("/pool") javax.ws.rs.core.Response getPool()Retrieves the current machine pool members. More details can be found in the official API documentation.- Returns:
- A response message as per the cloud pool REST API.
-
setDesiredSize
@POST @Path("/pool/size") javax.ws.rs.core.Response setDesiredSize(SetDesiredSizeRequest request)Sets the desired number of machines in the machine pool. This method is asynchronous in that the method returns immediately without having carried out any required changes to the machine pool. More details can be found in the official API documentation.- Parameters:
request- ASetDesiredSizeRequest.- Returns:
- A response message as per the cloud pool REST API.
-
getPoolSize
@GET @Path("/pool/size") 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). More details can be found in the official API documentation.- Returns:
- A response message as per the cloud pool REST API.
-
terminateMachine
@POST @Path("/pool/terminate") javax.ws.rs.core.Response terminateMachine(TerminateMachineRequest request)Terminates a particular machine pool member. The caller can control if a replacement machine is to be provisioned. Note: a machine that is protected from removal by a membership status withevictable: falsecan not be terminated. More details can be found in the official API documentation.- Parameters:
request- ATerminateMachineRequest.- Returns:
- A response message as per the cloud pool REST API.
-
detachMachine
@POST @Path("/pool/detach") javax.ws.rs.core.Response detachMachine(DetachMachineRequest request)Removes a member from the pool without terminating it. The machine keeps running but is no longer considered a pool member and, therefore, needs to be managed independently. The caller can control if a replacement machine is to be provisioned. Note: a machine that is protected from removal by a membership status withevictable: falsecan not be detached. More details can be found in the official API documentation.- Parameters:
request- ADetachMachineRequest.- Returns:
- A response message as per the cloud pool REST API.
-
attachMachine
@POST @Path("/pool/attach") javax.ws.rs.core.Response attachMachine(AttachMachineRequest request)Attaches an already running machine instance to the pool, growing the pool with a new member. This operation implies that the desired size of the pool is incremented by one. More details can be found in the official API documentation.- Parameters:
request- AnAttachMachineRequest.- Returns:
- A response message as per the cloud pool REST API.
-
setServiceState
@POST @Path("/pool/serviceState") javax.ws.rs.core.Response setServiceState(SetServiceStateRequest request)Sets the service state for a given machine pool member. Setting the service state does not have any functional implications on the pool member, but should be seen as way to supply operational information about the service running on the machine to third-party services (such as load balancers). More details can be found in the official API documentation.- Parameters:
request- ASetServiceStateRequest.- Returns:
- A response message as per the cloud pool REST API.
-
setMembershipStatus
@POST @Path("/pool/membershipStatus") javax.ws.rs.core.Response setMembershipStatus(SetMembershipStatusRequest request)Sets the membership status for a given pool member. The membership status for a machine can be set to protect the machine from being terminated (by setting its evictability status) and/or to mark a machine as being in need of replacement by flagging it as an inactive pool member. More details can be found in the official API documentation.- Parameters:
request- ASetMembershipStatusRequest.- Returns:
- A response message as per the cloud pool REST API.
-
-