@Consumes(value="text/plain") public interface ElasticStackApi extends Closeable
| Modifier and Type | Method and Description |
|---|---|
ServerInfo |
createAndStartServer(Server createServer)
create and start a new server
|
DriveInfo |
createDrive(Drive createDrive)
create a new drive
|
ServerInfo |
createServer(Server createServer)
create a new server
|
void |
destroyDrive(String uuid)
Destroy a drive
|
void |
destroyServer(String uuid)
Destroy a server
|
DriveInfo |
getDriveInfo(String uuid) |
ServerInfo |
getServerInfo(String uuid) |
void |
imageDrive(String source,
String destination)
Image a drive from another drive.
|
void |
imageDrive(String source,
String destination,
ImageConversionType conversionType) |
Set<DriveInfo> |
listDriveInfo()
Get all drives info
|
Set<String> |
listDrives()
list of drive uuids in your account
|
Set<ServerInfo> |
listServerInfo()
Get all servers info
|
Set<String> |
listServers()
list of server uuids in your account
|
Set<StandardDrive> |
listStandardDriveInfo()
Gets information about all standard drives
|
Set<String> |
listStandardDrives()
Lists standard drive UUIDs in your account
|
Payload |
readDrive(String uuid,
long offset,
long size)
Read binary data from a drive
|
void |
resetServer(String uuid)
Reset a server
|
DriveInfo |
setDriveData(String uuid,
DriveData setDrive)
set extra drive data
|
ServerInfo |
setServerConfiguration(String uuid,
Server setServer)
set server configuration
|
void |
shutdownServer(String uuid)
Shutdown a server
Sends the server an ACPI power-down event.
|
void |
startServer(String uuid)
Start a server
|
void |
stopServer(String uuid)
Stop a server
Kills the server immediately, equivalent to a power failure.
|
void |
writeDrive(String uuid,
Payload content)
Write binary data to a drive
|
void |
writeDrive(String uuid,
Payload content,
long offset) |
@GET @Path(value="/servers/list") Set<String> listServers()
@GET @Path(value="/servers/info") Set<ServerInfo> listServerInfo()
@GET
@Path(value="/servers/{uuid}/info")
ServerInfo getServerInfo(@PathParam(value="uuid")
String uuid)
uuid - what to get@POST @Path(value="/servers/create/stopped") ServerInfo createServer(Server createServer)
createServer - @POST
@Path(value="/servers/{uuid}/set")
ServerInfo setServerConfiguration(@PathParam(value="uuid")
String uuid,
Server setServer)
uuid - what server to changesetServer - what values to change@POST
@Path(value="/servers/{uuid}/destroy")
void destroyServer(@PathParam(value="uuid")
String uuid)
uuid - what to destroy@POST
@Path(value="/servers/{uuid}/start")
void startServer(@PathParam(value="uuid")
String uuid)
uuid - what to start@POST
@Path(value="/servers/{uuid}/stop")
void stopServer(@PathParam(value="uuid")
String uuid)
uuid - what to stop@POST
@Path(value="/servers/{uuid}/shutdown")
void shutdownServer(@PathParam(value="uuid")
String uuid)
uuid - what to shutdown@POST
@Path(value="/servers/{uuid}/reset")
void resetServer(@PathParam(value="uuid")
String uuid)
uuid - what to reset@GET @Path(value="/drives/list") Set<String> listDrives()
@GET @Path(value="/drives/info") Set<DriveInfo> listDriveInfo()
@GET @Path(value="/drives/list/standard") Set<String> listStandardDrives()
@GET @Path(value="/drives/info/standard") Set<StandardDrive> listStandardDriveInfo()
@GET
@Path(value="/drives/{uuid}/info")
DriveInfo getDriveInfo(@PathParam(value="uuid")
String uuid)
uuid - what to get@POST @Path(value="/drives/create") DriveInfo createDrive(Drive createDrive)
createDrive - required parameters: name, size@POST
@Path(value="/drives/{uuid}/set")
DriveInfo setDriveData(@PathParam(value="uuid")
String uuid,
DriveData setDrive)
uuid - what drive to changesetDrive - what values to change@POST
@Path(value="/drives/{uuid}/destroy")
void destroyDrive(@PathParam(value="uuid")
String uuid)
uuid - what to delete@POST @Path(value="/servers/create") ServerInfo createAndStartServer(Server createServer)
createServer - @POST
@Path(value="/drives/{destination}/image/{source}")
void imageDrive(@PathParam(value="source")
String source,
@PathParam(value="destination")
String destination)
source - drive to copy fromdestination - drive to copy to@POST
@Path(value="/drives/{destination}/image/{source}/{conversion}")
void imageDrive(@PathParam(value="source")
String source,
@PathParam(value="destination")
String destination,
@PathParam(value="conversion")
ImageConversionType conversionType)
conversionType - Supports 'gzip' or 'gunzip' conversions.imageDrive(String, String)@POST
@Consumes(value="application/octet-stream")
@Path(value="/drives/{uuid}/read/{offset}/{size}")
Payload readDrive(@PathParam(value="uuid")
String uuid,
@PathParam(value="offset")
long offset,
@PathParam(value="size")
long size)
uuid - drive to readoffset - start at the specified offset in bytessize - the specified size in bytes; must be <=4096k@POST
@Produces(value="application/octet-stream")
@Path(value="/drives/{uuid}/write")
void writeDrive(@PathParam(value="uuid")
String uuid,
Payload content)
uuid - drive to writecontent - what to write.
@POST
@Produces(value="application/octet-stream")
@Path(value="/drives/{uuid}/write/{offset}")
void writeDrive(@PathParam(value="uuid")
String uuid,
Payload content,
@PathParam(value="offset")
long offset)
offset - the byte offset in the target drive at which to start writing, not an offset in the
input stream.writeDrive(String, Payload)Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.