Package org.jclouds.elasticstack
Interface ElasticStackApi
- All Superinterfaces:
AutoCloseable
,Closeable
Provides synchronous access to elasticstack via their REST API.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateAndStartServer
(Server createServer) create and start a new servercreateDrive
(Drive createDrive) create a new drivecreateServer
(Server createServer) create a new servervoid
destroyDrive
(String uuid) Destroy a drivevoid
destroyServer
(String uuid) Destroy a servergetDriveInfo
(String uuid) getServerInfo
(String uuid) void
imageDrive
(String source, String destination) Image a drive from another drive.void
imageDrive
(String source, String destination, ImageConversionType conversionType) Get all drives infolist of drive uuids in your accountGet all servers infolist of server uuids in your accountGets information about all standard drivesLists standard drive UUIDs in your accountRead binary data from a drivevoid
resetServer
(String uuid) Reset a serversetDriveData
(String uuid, DriveData setDrive) set extra drive datasetServerConfiguration
(String uuid, Server setServer) set server configurationvoid
shutdownServer
(String uuid) Shutdown a servervoid
startServer
(String uuid) Start a servervoid
stopServer
(String uuid) Stop a servervoid
writeDrive
(String uuid, Payload content) Write binary data to a drivevoid
writeDrive
(String uuid, Payload content, long offset)
-
Method Details
-
listServers
list of server uuids in your account- Returns:
- or empty set if no servers are found
-
listServerInfo
Get all servers info- Returns:
- or empty set if no servers are found
-
getServerInfo
- Parameters:
uuid
- what to get- Returns:
- null, if not found
-
createServer
create a new server- Parameters:
createServer
-- Returns:
- newly created server
-
setServerConfiguration
@POST @Path("/servers/{uuid}/set") ServerInfo setServerConfiguration(@PathParam("uuid") String uuid, Server setServer) set server configuration- Parameters:
uuid
- what server to changesetServer
- what values to change- Returns:
- new data
-
destroyServer
Destroy a server- Parameters:
uuid
- what to destroy
-
startServer
Start a server- Parameters:
uuid
- what to start
-
stopServer
Stop a server Kills the server immediately, equivalent to a power failure. Server reverts to a stopped status if it is persistent and is automatically destroyed otherwise.- Parameters:
uuid
- what to stop
-
shutdownServer
Shutdown a server Sends the server an ACPI power-down event. Server reverts to a stopped status if it is persistent and is automatically destroyed otherwise.note
behaviour on shutdown depends on how your server OS is set up to respond to an ACPI power button signal.- Parameters:
uuid
- what to shutdown
-
resetServer
Reset a server- Parameters:
uuid
- what to reset
-
listDrives
list of drive uuids in your account- Returns:
- or empty set if no drives are found
-
listDriveInfo
Get all drives info- Returns:
- or empty set if no drives are found
-
listStandardDrives
Lists standard drive UUIDs in your account- Returns:
- or empty set if no standard drives are found
-
listStandardDriveInfo
Gets information about all standard drives- Returns:
- or empty set if no standard drives are found
-
getDriveInfo
- Parameters:
uuid
- what to get- Returns:
- null, if not found
-
createDrive
create a new drive- Parameters:
createDrive
- required parameters: name, size- Returns:
- newly created drive
-
setDriveData
@POST @Path("/drives/{uuid}/set") DriveInfo setDriveData(@PathParam("uuid") String uuid, DriveData setDrive) set extra drive data- Parameters:
uuid
- what drive to changesetDrive
- what values to change- Returns:
- new data
-
destroyDrive
Destroy a drive- Parameters:
uuid
- what to delete
-
createAndStartServer
create and start a new server- Parameters:
createServer
-- Returns:
- newly created server
-
imageDrive
@POST @Path("/drives/{destination}/image/{source}") void imageDrive(@PathParam("source") String source, @PathParam("destination") String destination) Image a drive from another drive. The actual imaging process is asynchronous, with progress reported via drive info.- Parameters:
source
- drive to copy fromdestination
- drive to copy to
-
imageDrive
@POST @Path("/drives/{destination}/image/{source}/{conversion}") void imageDrive(@PathParam("source") String source, @PathParam("destination") String destination, @PathParam("conversion") ImageConversionType conversionType) - Parameters:
conversionType
- Supports 'gzip' or 'gunzip' conversions.- See Also:
-
readDrive
@POST @Consumes("application/octet-stream") @Path("/drives/{uuid}/read/{offset}/{size}") Payload readDrive(@PathParam("uuid") String uuid, @PathParam("offset") long offset, @PathParam("size") long size) Read binary data from a drive- Parameters:
uuid
- drive to readoffset
- start at the specified offset in bytessize
- the specified size in bytes; must be invalid input: '<'=4096k- Returns:
- binary content of the drive.
-
writeDrive
@POST @Produces("application/octet-stream") @Path("/drives/{uuid}/write") void writeDrive(@PathParam("uuid") String uuid, Payload content) Write binary data to a drive- Parameters:
uuid
- drive to writecontent
- what to write.- Binary data (Content-Type: application/octet-stream)
- Supports raw data or Content-Encoding: gzip
- Does not support Transfer-Encoding: chunked
-
writeDrive
@POST @Produces("application/octet-stream") @Path("/drives/{uuid}/write/{offset}") void writeDrive(@PathParam("uuid") String uuid, Payload content, @PathParam("offset") long offset) - Parameters:
offset
- the byte offset in the target drive at which to start writing, not an offset in the input stream.- See Also:
-