public interface InstanceApi
Instance| Modifier and Type | Method and Description |
|---|---|
Instance |
create(int flavor,
int volumeSize,
String name)
Same as
create(String, int, String) but accept an integer Flavor ID. |
Instance |
create(String flavor,
int volumeSize,
String name)
Create a database instance by flavor type and volume size.
|
boolean |
delete(String instanceId)
Deletes an Instance by id.
|
String |
enableRoot(String instanceId)
Enables root for an instance.
|
Instance |
get(String instanceId)
Returns an Instance by id.
|
boolean |
isRooted(String instanceId)
Checks to see if root is enabled for an instance.
|
com.google.common.collect.FluentIterable<Instance> |
list()
Returns a summary list of Instances.
|
@Named(value="instance:create") @POST @Path(value="/instances") @Consumes(value="application/json") Instance create(int flavor, int volumeSize, String name)
create(String, int, String) but accept an integer Flavor ID.flavor - The flavor ID.volumeSize - The size in GB of the instance volume.name - The name of the instance.create(String, int, String)@Named(value="instance:create") @POST @Path(value="/instances") @Consumes(value="application/json") Instance create(String flavor, int volumeSize, String name)
flavor - The flavor URL or flavor id as string.volumeSize - The size in GB of the instance volume.name - The name of the instance.@Named(value="instances:delete/{id}")
@DELETE
@Path(value="/instances/{id}")
@Consumes(value="application/json")
boolean delete(@PathParam(value="id")
String instanceId)
instanceId - The instance id.@Named(value="instances/{id}/root")
@POST
@Path(value="/instances/{id}/root")
@Consumes(value="application/json")
String enableRoot(@PathParam(value="id")
String instanceId)
instanceId - The instance id.@Named(value="instances/{id}/root")
@GET
@Path(value="/instances/{id}/root")
@Consumes(value="application/json")
boolean isRooted(@PathParam(value="id")
String instanceId)
instanceId - The instance id.ResourceNotFoundException@Named(value="instance:list") @GET @Path(value="/instances") @Consumes(value="application/json") com.google.common.collect.FluentIterable<Instance> list()
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.