Modifier and Type | Method and Description |
---|---|
Server |
addServer(String name,
String image,
String ram,
String ip,
AddServerOptions... addServerOptions)
Adds a server with specified attributes
|
Server |
deleteById(long id)
Deletes the server by Id
|
Server |
deleteByName(String name)
Deletes the server by name;
NOTE: Using this parameter may generate an error if one or more servers
share a non-unique name.
|
Server |
editServerDescription(long id,
String newDescription)
Edits an existing server
|
Server |
editServerRam(long id,
String ram)
Edits an existing server
|
Server |
editServerType(long id,
String newType)
Edits an existing server
|
Set<Option> |
getDatacenters()
Retrieves the list of supported Datacenters to launch servers into.
|
Set<Option> |
getRamSizes()
Retrieves the list of supported RAM configurations.
|
Credentials |
getServerCredentials(long id) |
Map<String,Credentials> |
getServerCredentialsList()
Returns a map of running servers' names to the log in credentials.
|
Set<Server> |
getServerList(GetServerListOptions... getServerListOptions)
Returns the list of all servers.
|
Set<Server> |
getServersById(long... ids)
Returns the server(s) by unique id(s).
|
Set<Server> |
getServersByName(String... names)
Returns the server(s) by unique name(s).
|
Set<Option> |
getTypes()
Retrieves the list of supported server types, for example Web/App Server and Database Server.
|
Server |
power(String idOrName,
PowerCommand power)
Changes the server's state according to
PowerCommand |
@GET @Path(value="/grid/server/list") Set<Server> getServerList(GetServerListOptions... getServerListOptions)
getServerListOptions
- options to narrow down the result@GET @Path(value="/grid/server/get") Set<Server> getServersByName(String... names)
names
- to get the servers@GET @Path(value="/grid/server/get") Set<Server> getServersById(long... ids)
ids
- to get the servers@GET @Path(value="/support/password/list") Map<String,Credentials> getServerCredentialsList()
@GET @Path(value="/support/grid/password/get") Credentials getServerCredentials(@QueryParam(value="id") long id)
@GET @Path(value="/grid/server/add") Server addServer(@QueryParam(value="name") String name, @QueryParam(value="image") String image, @QueryParam(value="server.ram") String ram, @QueryParam(value="ip") String ip, AddServerOptions... addServerOptions)
name
- name of the serverimage
- image (id or name)ram
- ram type (id or name)ip
- ip addressaddServerOptions
- options to make it a sandbox instance or/and description@GET @Path(value="/grid/server/power") Server power(@QueryParam(value="server") String idOrName, @QueryParam(value="power") PowerCommand power)
PowerCommand
idOrName
- id or name of the server to apply the commandpower
- new desired state@GET @Path(value="/grid/server/delete") Server deleteById(@QueryParam(value="id") long id)
id
- id of the server to delete@GET @Path(value="/grid/server/delete") Server deleteByName(@QueryParam(value="name") String name)
name
- name of the server to be deleted@GET @Path(value="/common/lookup/list") Set<Option> getRamSizes()
addServer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.jclouds.gogrid.options.AddServerOptions...)
.
To see how RAM maps to CPU and disk space (as of March 2010), see
GoGridComputeServiceContextModule.provideSizeToRam()
.@GET @Path(value="/common/lookup/list") Set<Option> getTypes()
editServerType(long, java.lang.String)
.@GET @Path(value="/common/lookup/list") Set<Option> getDatacenters()
addServer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.jclouds.gogrid.options.AddServerOptions...)
.@GET @Path(value="/grid/server/edit") Server editServerDescription(@QueryParam(value="id") long id, @QueryParam(value="description") String newDescription)
id
- id of the existing servernewDescription
- description to replace the current one@GET @Path(value="/grid/server/edit") Server editServerRam(@QueryParam(value="id") long id, @QueryParam(value="server.ram") String ram)
id
- id of the existing serverram
- ram to replace the current oneCopyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.