Modifier and Type | Method and Description |
---|---|
ServerDetails |
clone(String serverid,
String hostname,
CloneServerOptions... options)
Clone a server
|
ServerDetails |
createWithHostnameAndRootPassword(ServerSpec serverSpec,
String hostname,
String rootPassword,
CreateServerOptions... options)
Create a new server
|
void |
destroy(String id,
DestroyServerOptions keepIp)
Destroy a server
|
ServerDetails |
get(String id)
Get detailed information about a server such as hostname, hardware
configuration (cpu, memory and disk), ip addresses, cost, transfer, os and
more.
|
Map<String,AllowedArgumentsForCreateServer> |
getAllowedArgumentsForCreateByPlatform()
Get information about the OS templates available
|
Console |
getConsole(String id)
Get information about how to connect to a server via VNC
|
SortedMap<String,ServerLimit> |
getLimits(String id)
Get detailed information about a server's limits (for OpenVZ only).
|
ResourceUsage |
getResourceUsage(String id,
String resource,
String resolution)
Return resource usage over time for server
|
ServerStatus |
getStatus(String id,
ServerStatusOptions... options)
Get detailed information about a server status including up-time and
hardware usage (cpu, disk, memory and bandwidth)
|
ServerDetails |
hardStop(String id)
hard stop a server
|
com.google.common.collect.FluentIterable<Server> |
list()
Get a list of all servers on this account.
|
com.google.common.collect.FluentIterable<OSTemplate> |
listTemplates()
Get information about valid arguments to #createServer for each platform
|
ServerDetails |
reboot(String id)
Reboot a server
|
SortedMap<String,ServerLimit> |
resetLimit(String id,
String type)
Reset the fail count for a server limit (for OpenVZ only).
|
ServerDetails |
resetPassword(String id,
String password)
Reset the root password of a server
|
ServerDetails |
start(String id)
Start a server
|
ServerDetails |
stop(String id)
Stop a server
|
ServerDetails |
update(String serverid,
UpdateServerOptions options)
Update the configuration of a server
|
@Named(value="server:list") @POST @Path(value="/server/list/format/json") @Consumes(value="application/json") com.google.common.collect.FluentIterable<Server> list()
@Named(value="server:details") @POST @Path(value="/server/details/format/json") @Consumes(value="application/json") ServerDetails get(@FormParam(value="serverid") String id)
id
- id of the server@Named(value="server:status") @POST @Path(value="/server/status/format/json") @Consumes(value="application/json") ServerStatus getStatus(@FormParam(value="serverid") String id, ServerStatusOptions... options)
id
- id of the serveroptions
- optional parameters@Named(value="server:limits") @POST @Path(value="/server/limits/format/json") @Consumes(value="application/json") SortedMap<String,ServerLimit> getLimits(@FormParam(value="serverid") String id)
id
- id of the server@Named(value="server:console") @POST @Path(value="/server/console/format/json") @Consumes(value="application/json") Console getConsole(@FormParam(value="serverid") String id)
id
- id of the server@Named(value="server:allowedarguments") @GET @Path(value="/server/allowedarguments/format/json") @Consumes(value="application/json") Map<String,AllowedArgumentsForCreateServer> getAllowedArgumentsForCreateByPlatform()
@Named(value="server:templates") @GET @Path(value="/server/templates/format/json") @Consumes(value="application/json") com.google.common.collect.FluentIterable<OSTemplate> listTemplates()
@Named(value="server:resetlimit") @POST @Path(value="/server/resetlimit/format/json") @Consumes(value="application/json") SortedMap<String,ServerLimit> resetLimit(@FormParam(value="serverid") String id, @FormParam(value="type") String type)
id
- id of the servertype
- the type of limit to reset@Named(value="server:reboot") @POST @Path(value="/server/reboot/format/json") @Consumes(value="application/json") ServerDetails reboot(@FormParam(value="serverid") String id)
id
- id of the server@Named(value="server:start") @POST @Path(value="/server/start/format/json") @Consumes(value="application/json") ServerDetails start(@FormParam(value="serverid") String id)
id
- id of the server@Named(value="server:stop") @POST @Path(value="/server/stop/format/json") @Consumes(value="application/json") ServerDetails stop(@FormParam(value="serverid") String id)
id
- id of the server@Named(value="server:stop:hard") @POST @Path(value="/server/stop/format/json") @Consumes(value="application/json") ServerDetails hardStop(@FormParam(value="serverid") String id)
id
- id of the server@Named(value="server:create") @POST @Path(value="/server/create/format/json") @Consumes(value="application/json") ServerDetails createWithHostnameAndRootPassword(ServerSpec serverSpec, String hostname, String rootPassword, CreateServerOptions... options)
hostname
- the host name of the new serverrootPassword
- the root password to useoptions
- optional settings ex. description@Named(value="server:clone") @POST @Path(value="/server/clone/format/json") @Consumes(value="application/json") ServerDetails clone(@FormParam(value="serverid") String serverid, @FormParam(value="hostname") String hostname, CloneServerOptions... options)
serverid
- the serverId of the server to clonehostname
- the new host name of the cloned serveroptions
- the settings to change@Named(value="server:edit") @POST @Path(value="/server/edit/format/json") @Consumes(value="application/json") ServerDetails update(@FormParam(value="serverid") String serverid, UpdateServerOptions options)
serverid
- the serverId of the server to editoptions
- the settings to change@Named(value="server:destroy") @POST @Path(value="/server/destroy/format/json") void destroy(@FormParam(value="serverid") String id, DestroyServerOptions keepIp)
id
- the id of the serverkeepIp
- if DestroyServerOptions.keepIp(true) the servers ip will be retained for use in your GleSYS account@Named(value="server:resetpassword") @POST @Path(value="/server/resetpassword/format/json") @Consumes(value="application/json") ServerDetails resetPassword(@FormParam(value="serverid") String id, @FormParam(value="rootpassword") String password)
id
- the id of the serverpassword
- the new password to use@Named(value="server:resourceusage") @POST @Path(value="/server/resourceusage/format/json") @Consumes(value="application/json") ResourceUsage getResourceUsage(@FormParam(value="serverid") String id, @FormParam(value="resource") String resource, @FormParam(value="resolution") String resolution)
id
- the id of the serverresource
- the name of the resource to retrieve usage information for (e.g. "cpuusage")resolution
- the time-period to extract data for (one of "minute", "hour" or "day)Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.