com.cloudbees.api
Class BeesClient
java.lang.Object
com.cloudbees.api.BeesClientBase
com.cloudbees.api.BeesClient
public class BeesClient
- extends com.cloudbees.api.BeesClientBase
- Author:
- Fabian Donze, Kohsuke Kawaguchi
| Fields inherited from class com.cloudbees.api.BeesClientBase |
format |
|
Method Summary |
AccountKeysResponse |
accountKeys(String domain,
String user,
String password)
|
AccountListResponse |
accountList()
|
AccountRegionListResponse |
accountRegionList(String account,
String service)
|
CBUser |
addUserToAccount(CBAccount account,
CBUser user)
|
protected Object |
apiCall(String apiMethod,
Map<String,String> settings,
Map<String,String> params)
|
ApplicationCheckSumsResponse |
applicationCheckSums(String appId)
|
ApplicationCheckSumsResponse |
applicationCheckSums(String appId,
boolean traceResponse)
|
ApplicationConfigUpdateResponse |
applicationConfigUpdate(String appId,
Map<String,String> parameters)
|
ApplicationDeleteResponse |
applicationDelete(String appId)
|
ApplicationDeployArchiveResponse |
applicationDeployArchive(ApplicationDeployArgs args)
|
ApplicationDeployArchiveResponse |
applicationDeployArchive(String appId,
String environment,
String description,
File earFile,
File srcFile,
String archiveType,
boolean deltaDeploy,
Map<String,String> parameters,
com.cloudbees.api.UploadProgress progress)
|
ApplicationDeployArchiveResponse |
applicationDeployArchive(String appId,
String environment,
String description,
File earFile,
File srcFile,
String archiveType,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
|
ApplicationDeployArchiveResponse |
applicationDeployArchive(String appId,
String environment,
String description,
File earFile,
File srcFile,
String archiveType,
com.cloudbees.api.UploadProgress progress)
|
ApplicationDeployArchiveResponse |
applicationDeployArchive(String appId,
String environment,
String description,
String earFile,
String srcFile,
String archiveType,
boolean deltaDeploy,
Map<String,String> parameters,
com.cloudbees.api.UploadProgress progress)
Deprecated. use applicationDeployArchive(String, String, String, File, File, String, boolean, Map,
UploadProgress) |
ApplicationDeployArchiveResponse |
applicationDeployArchive(String appId,
String environment,
String description,
String earFile,
String srcFile,
String archiveType,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
Deprecated. use applicationDeployArchive(String, String, String, File, File, String, boolean,
UploadProgress) |
ApplicationDeployArchiveResponse |
applicationDeployArchive(String appId,
String environment,
String description,
String earFile,
String srcFile,
String archiveType,
com.cloudbees.api.UploadProgress progress)
Deprecated. use applicationDeployArchive(String, String, String, File, File, String, UploadProgress) |
ApplicationDeployArchiveResponse |
applicationDeployEar(String appId,
String environment,
String description,
File earFile,
File srcFile,
com.cloudbees.api.UploadProgress progress)
|
ApplicationDeployArchiveResponse |
applicationDeployEar(String appId,
String environment,
String description,
String earFile,
String srcFile,
com.cloudbees.api.UploadProgress progress)
Deprecated. use applicationDeployEar(String, String, String, java.io.File, java.io.File, UploadProgress) |
ApplicationDeployArchiveResponse |
applicationDeployWar(String appId,
String environment,
String description,
File warFile,
File srcFile,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
|
ApplicationDeployArchiveResponse |
applicationDeployWar(String appId,
String environment,
String description,
File warFile,
File srcFile,
com.cloudbees.api.UploadProgress progress)
|
ApplicationDeployArchiveResponse |
applicationDeployWar(String appId,
String environment,
String description,
String warFile,
String srcFile,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
Deprecated. use applicationDeployWar(String, String, String, File, File, boolean, UploadProgress) |
ApplicationDeployArchiveResponse |
applicationDeployWar(String appId,
String environment,
String description,
String warFile,
String srcFile,
com.cloudbees.api.UploadProgress progress)
Deprecated. use applicationDeployWar(String, String, String, File, File, UploadProgress) |
ApplicationGetSourceUrlResponse |
applicationGetSourceUrl(String appId)
|
ApplicationStatusResponse |
applicationHibernate(String appId)
|
ApplicationInfo |
applicationInfo(String appId)
|
ApplicationInstanceStatusResponse |
applicationInstanceDelete(String instanceId)
|
ApplicationInstanceInfo |
applicationInstanceInfo(String instanceId)
|
ApplicationInstanceInvokeResponse |
applicationInstanceInvoke(String instanceId,
String invoke,
Map<String,String> parameters)
|
ApplicationInstanceListResponse |
applicationInstanceList(String appId)
|
ApplicationInstanceStatusResponse |
applicationInstanceReplace(String instanceId)
|
ApplicationInstanceStatusResponse |
applicationInstanceRestart(String instanceId)
|
ApplicationInstanceInfo |
applicationInstanceTagsUpdate(String instanceId,
Map<String,String> tags,
boolean replace)
|
void |
applicationInstanceTailLog(String instanceId,
String logName,
OutputStream out)
|
ApplicationJarHashesResponse |
applicationJarCrcs(String appId,
Map<String,String> hashes)
Deprecated. |
ApplicationJarHashesResponse |
applicationJarHashes(String appId,
Map<String,String> hashes)
|
ApplicationListResponse |
applicationList()
Returns all the applications in all the account sthat you belong to. |
ApplicationListResponse |
applicationList(String account)
Returns all the applications in the specified account. |
ApplicationStatusResponse |
applicationProxyUpdate(String appId,
Map<String,String> parameters)
|
ApplicationRestartResponse |
applicationRestart(String appId)
|
ApplicationScaleResponse |
applicationScale(String appId,
int unit)
|
ApplicationSetMetaResponse |
applicationSetMeta(String appId,
Map<String,String> metaAttrs)
|
ApplicationSnapshotStatusResponse |
applicationSnapshotDelete(String snapshotId)
|
ApplicationSnapshotInfo |
applicationSnapshotInfo(String snapshotId)
|
ApplicationSnapshotListResponse |
applicationSnapshotList(String appId)
|
ApplicationSnapshotStatusResponse |
applicationSnapshotUpdate(String snapshotId,
Map<String,String> parameters)
|
ApplicationStatusResponse |
applicationStart(String appId)
|
ApplicationStatusResponse |
applicationStop(String appId)
|
String |
call(String action,
Map<String,String> params)
|
ConfigurationParametersResponse |
configurationParameters(String resourceId,
String configType)
|
ConfigParameters |
configurationParametersAsObject(String resourceId,
String configType)
Perform configurationParameters(String, String) and obtains the result as a data-bound object. |
ConfigurationParametersDeleteResponse |
configurationParametersDelete(String resourceId,
String configType)
|
ConfigurationParametersUpdateResponse |
configurationParametersUpdate(String resourceId,
String configType,
ConfigParameters model)
Updates the configuration of the given resource from the configuration object model. |
ConfigurationParametersUpdateResponse |
configurationParametersUpdate(String resourceId,
String configType,
File resourceFile)
|
protected String |
createParameter(Map<String,String> parameters)
|
CBUser |
createUser(CBUser user)
Creates an user, including a partial user creation. |
DatabaseCreateResponse |
databaseCreate(String domain,
String dbId,
String username,
String password)
|
DatabaseDeleteResponse |
databaseDelete(String dbId)
|
DatabaseInfo |
databaseInfo(String dbId,
boolean fetchPassword)
|
DatabaseListResponse |
databaseList()
Returns all the databases in all the account sthat you belong to. |
DatabaseListResponse |
databaseList(String account)
Returns all the databases in the specified account. |
DatabaseSetPasswordResponse |
databaseSetPassword(String dbId,
String password)
|
DatabaseSnapshotInfo |
databaseSnapshotCreate(String dbId,
String snapshotTitle)
|
DatabaseSnapshotDeleteResponse |
databaseSnapshotDelete(String dbId,
String snapshotId)
|
DatabaseSnapshotDeployResponse |
databaseSnapshotDeploy(String dbId,
String snapshotId)
|
DatabaseSnapshotListResponse |
databaseSnapshotList(String dbId)
|
void |
deleteUser(String id)
Deletes an user. |
static String |
encodePassword(String password,
String version)
|
String |
executeRequest(String url)
|
protected String |
executeUpload(String uploadURL,
Map<String,String> params,
Map<String,File> files,
com.cloudbees.api.UploadProgress writeListener)
|
CBAccount |
getAccount(String name)
|
protected static ApplicationConfiguration |
getAppConfig(File deployZip,
String[] environments,
String[] implicitEnvironments)
|
ApplicationConfiguration |
getApplicationConfiguration(String warFilePath,
String account,
String[] environments)
|
CBUser |
getUser(String id)
Looks up the user by ID. |
CBUser |
getUserByFingerprint(String sshPublicKeyFingerprint)
Looks up the user by the public key fingerprint |
protected com.thoughtworks.xstream.XStream |
getXStream()
|
protected
|
jsonPOJORequest(String apiTail,
Object request,
Class<T> type,
String method)
The actual engine behind the REST API call. |
HttpReply |
jsonRequest(String urlTail,
String method,
Map<String,String> headers,
String jsonContent)
Sends a request in JSON and expects a JSON response back. |
void |
main(String[] args)
|
void |
mainCall(String[] args)
|
protected Object |
readResponse(String response)
|
ServiceResourceBindResponse |
resourceBind(String fromService,
String fromResourceId,
String toService,
String toResourceId,
String alias,
Map<String,String> settings)
|
ServiceResourceBindingListResponse |
resourceBindingList(String service,
String resourceId)
|
ServiceResourceBindingListResponse |
resourceBindingList(String service,
String resourceId,
boolean bidirectional)
|
ServiceResourceUnBindResponse |
resourceUnBind(String service,
String resourceId,
String alias)
|
SayHelloResponse |
sayHello(String message)
|
ServiceListResponse |
serviceList(String account)
|
ServiceResourceInfo |
serviceResourceCreate(String service,
String account,
String resourceType,
String resourceName,
Map<String,String> settings)
|
ServiceResourceDeleteResponse |
serviceResourceDelete(String service,
String resourceId)
|
ServiceResourceInfo |
serviceResourceInfo(String service,
String resourceId)
|
ServiceResourceListResponse |
serviceResourceList(String service,
String account,
String resourceType)
|
ServiceResourceInfo |
serviceResourceUpdate(String service,
String resourceId,
Map<String,String> settings)
|
ServiceSubscriptionInfo |
serviceSubscribe(String service,
String plan,
String account,
Map<String,String> settings)
|
ServiceSubscriptionInfo |
serviceSubscriptionInfo(String service,
String subscriptionId)
|
ServiceSubscriptionListResponse |
serviceSubscriptionList(String account)
|
ServiceSubscriptionInfo |
serviceSubscriptionUpdate(String service,
String plan,
String subscriptionId,
Map<String,String> settings)
|
ServiceSubscriptionDeleteResponse |
serviceUnSubscribe(String service,
String subscriptionId)
|
void |
tailLog(String appId,
String logName,
OutputStream out)
|
CBUser |
updateUser(String id,
CBUser user)
Updates the user record. |
| Methods inherited from class com.cloudbees.api.BeesClientBase |
executeCometRequest, getApiUrl, getBeesClientConfiguration, getRequestURL, getRequestURL, getResponseString, getSignature, isVerbose, md5, processError, setVerbose, trace, traceResponse |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeesClient
public BeesClient(com.cloudbees.api.BeesClientConfiguration beesClientConfiguration)
BeesClient
public BeesClient(String server,
String apikey,
String secret,
String format,
String version)
createUser
public CBUser createUser(CBUser user)
throws IOException
- Creates an user, including a partial user creation.
- Throws:
IOException- See Also:
- API spec
updateUser
public CBUser updateUser(String id,
CBUser user)
throws IOException
- Updates the user record.
- Parameters:
id - The ID of the user to update. Corresponds to CBUser.id.user - You should only set fields that you want to update, and leave everything else to null, to indicate
those values should remain untouched.
- Throws:
IOException
deleteUser
public void deleteUser(String id)
throws IOException
- Deletes an user.
- Throws:
IOException
addUserToAccount
public CBUser addUserToAccount(CBAccount account,
CBUser user)
throws IOException
- Throws:
IOException
jsonPOJORequest
protected <T> T jsonPOJORequest(String apiTail,
Object request,
Class<T> type,
String method)
throws IOException
- The actual engine behind the REST API call.
It sends a request in JSON and expects a JSON response back.
Note that for historical reasons, there's the other half of the API that uses query parameters + digital signing.
- Parameters:
apiTail - The end point to hit. Appended to base. Shouldn't start with '/'request - JSON-bound POJO object that represents the request payload, or null if none.type - JSON-bound POJO class to unmarshal the response into.method - HTTP method name like GET or POST.
- Throws:
IOException - If the communication fails.
jsonRequest
public HttpReply jsonRequest(String urlTail,
String method,
Map<String,String> headers,
String jsonContent)
throws IOException
- Sends a request in JSON and expects a JSON response back.
- Parameters:
urlTail - The end point to hit. Appended to base. Shouldn't start with '/'method - HTTP method name like GET or POST.headers - jsonContent - The json request payload, or null if none. @throws IOException If the communication fails.
- Throws:
IOException
getAccount
public CBAccount getAccount(String name)
throws IOException
- Throws:
IOException
getUser
public CBUser getUser(String id)
throws IOException
- Looks up the user by ID.
- Throws:
IOException
getUserByFingerprint
public CBUser getUserByFingerprint(String sshPublicKeyFingerprint)
throws IOException
- Looks up the user by the public key fingerprint
- Parameters:
sshPublicKeyFingerprint - Fingerprint formatted as "12:34:56:..:aa:bb:cc" (case insensitive)
- Throws:
IOException
sayHello
public SayHelloResponse sayHello(String message)
throws Exception
- Throws:
Exception
applicationGetSourceUrl
public ApplicationGetSourceUrlResponse applicationGetSourceUrl(String appId)
throws Exception
- Throws:
Exception
applicationDelete
public ApplicationDeleteResponse applicationDelete(String appId)
throws Exception
- Throws:
Exception
applicationRestart
public ApplicationRestartResponse applicationRestart(String appId)
throws Exception
- Throws:
Exception
applicationStart
public ApplicationStatusResponse applicationStart(String appId)
throws Exception
- Throws:
Exception
applicationStop
public ApplicationStatusResponse applicationStop(String appId)
throws Exception
- Throws:
Exception
applicationHibernate
public ApplicationStatusResponse applicationHibernate(String appId)
throws Exception
- Throws:
Exception
applicationList
public ApplicationListResponse applicationList()
throws Exception
- Returns all the applications in all the account sthat you belong to.
Short-hand for
applicationList(null).
- Throws:
Exception
applicationList
public ApplicationListResponse applicationList(String account)
throws Exception
- Returns all the applications in the specified account.
- Parameters:
account - if null, returns all the applications from all the accounts that you belong to.
- Throws:
Exception- Since:
- 1.1.3
applicationInfo
public ApplicationInfo applicationInfo(String appId)
throws Exception
- Throws:
Exception
applicationSetMeta
public ApplicationSetMetaResponse applicationSetMeta(String appId,
Map<String,String> metaAttrs)
throws Exception
- Throws:
Exception
applicationJarCrcs
public ApplicationJarHashesResponse applicationJarCrcs(String appId,
Map<String,String> hashes)
throws Exception
- Deprecated.
- Throws:
Exception
applicationJarHashes
public ApplicationJarHashesResponse applicationJarHashes(String appId,
Map<String,String> hashes)
throws Exception
- Throws:
Exception
applicationDeployEar
@Deprecated
public ApplicationDeployArchiveResponse applicationDeployEar(String appId,
String environment,
String description,
String earFile,
String srcFile,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Deprecated. use
applicationDeployEar(String, String, String, java.io.File, java.io.File, UploadProgress)
- Throws:
Exception
applicationDeployEar
public ApplicationDeployArchiveResponse applicationDeployEar(String appId,
String environment,
String description,
File earFile,
File srcFile,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Throws:
Exception- Since:
- 1.1.4
applicationDeployWar
@Deprecated
public ApplicationDeployArchiveResponse applicationDeployWar(String appId,
String environment,
String description,
String warFile,
String srcFile,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Deprecated. use
applicationDeployWar(String, String, String, File, File, UploadProgress)
- Throws:
Exception
applicationDeployWar
public ApplicationDeployArchiveResponse applicationDeployWar(String appId,
String environment,
String description,
File warFile,
File srcFile,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Throws:
Exception- Since:
- 1.1.4
applicationDeployWar
@Deprecated
public ApplicationDeployArchiveResponse applicationDeployWar(String appId,
String environment,
String description,
String warFile,
String srcFile,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Deprecated. use
applicationDeployWar(String, String, String, File, File, boolean, UploadProgress)
- Throws:
Exception
applicationDeployWar
public ApplicationDeployArchiveResponse applicationDeployWar(String appId,
String environment,
String description,
File warFile,
File srcFile,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Throws:
Exception- Since:
- 1.1.4
applicationDeployArchive
@Deprecated
public ApplicationDeployArchiveResponse applicationDeployArchive(String appId,
String environment,
String description,
String earFile,
String srcFile,
String archiveType,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Deprecated. use
applicationDeployArchive(String, String, String, File, File, String, UploadProgress)
- Throws:
Exception
applicationDeployArchive
public ApplicationDeployArchiveResponse applicationDeployArchive(String appId,
String environment,
String description,
File earFile,
File srcFile,
String archiveType,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Throws:
Exception- Since:
- 1.1.4
applicationDeployArchive
@Deprecated
public ApplicationDeployArchiveResponse applicationDeployArchive(String appId,
String environment,
String description,
String earFile,
String srcFile,
String archiveType,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Deprecated. use
applicationDeployArchive(String, String, String, File, File, String, boolean,
UploadProgress)
- Throws:
Exception
applicationDeployArchive
public ApplicationDeployArchiveResponse applicationDeployArchive(String appId,
String environment,
String description,
File earFile,
File srcFile,
String archiveType,
boolean deltaDeploy,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Throws:
Exception- Since:
- 1.1.4
applicationDeployArchive
@Deprecated
public ApplicationDeployArchiveResponse applicationDeployArchive(String appId,
String environment,
String description,
String earFile,
String srcFile,
String archiveType,
boolean deltaDeploy,
Map<String,String> parameters,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Deprecated. use
applicationDeployArchive(String, String, String, File, File, String, boolean, Map,
UploadProgress)
- Throws:
Exception
applicationDeployArchive
public ApplicationDeployArchiveResponse applicationDeployArchive(String appId,
String environment,
String description,
File earFile,
File srcFile,
String archiveType,
boolean deltaDeploy,
Map<String,String> parameters,
com.cloudbees.api.UploadProgress progress)
throws Exception
- Throws:
Exception- Since:
- 1.1.4
applicationDeployArchive
public ApplicationDeployArchiveResponse applicationDeployArchive(ApplicationDeployArgs args)
throws Exception
- Throws:
Exception
applicationCheckSums
public ApplicationCheckSumsResponse applicationCheckSums(String appId)
throws Exception
- Throws:
Exception
applicationCheckSums
public ApplicationCheckSumsResponse applicationCheckSums(String appId,
boolean traceResponse)
throws Exception
- Throws:
Exception
applicationScale
public ApplicationScaleResponse applicationScale(String appId,
int unit)
throws Exception
- Throws:
Exception
databaseCreate
public DatabaseCreateResponse databaseCreate(String domain,
String dbId,
String username,
String password)
throws Exception
- Throws:
Exception
databaseDelete
public DatabaseDeleteResponse databaseDelete(String dbId)
throws Exception
- Throws:
Exception
databaseInfo
public DatabaseInfo databaseInfo(String dbId,
boolean fetchPassword)
throws Exception
- Throws:
Exception
databaseList
public DatabaseListResponse databaseList()
throws Exception
- Returns all the databases in all the account sthat you belong to.
Short-hand for
databaseList(null).
- Throws:
Exception
databaseList
public DatabaseListResponse databaseList(String account)
throws Exception
- Returns all the databases in the specified account.
- Parameters:
account - if null, returns all the databases from all the accounts that you belong to.
- Throws:
Exception- Since:
- 1.1.3
databaseSetPassword
public DatabaseSetPasswordResponse databaseSetPassword(String dbId,
String password)
throws Exception
- Throws:
Exception
databaseSnapshotList
public DatabaseSnapshotListResponse databaseSnapshotList(String dbId)
throws Exception
- Throws:
Exception
databaseSnapshotDelete
public DatabaseSnapshotDeleteResponse databaseSnapshotDelete(String dbId,
String snapshotId)
throws Exception
- Throws:
Exception
databaseSnapshotDeploy
public DatabaseSnapshotDeployResponse databaseSnapshotDeploy(String dbId,
String snapshotId)
throws Exception
- Throws:
Exception
databaseSnapshotCreate
public DatabaseSnapshotInfo databaseSnapshotCreate(String dbId,
String snapshotTitle)
throws Exception
- Throws:
Exception
accountKeys
public AccountKeysResponse accountKeys(String domain,
String user,
String password)
throws Exception
- Throws:
Exception
accountList
public AccountListResponse accountList()
throws Exception
- Throws:
Exception
getApplicationConfiguration
public ApplicationConfiguration getApplicationConfiguration(String warFilePath,
String account,
String[] environments)
throws Exception
- Throws:
Exception
configurationParametersUpdate
public ConfigurationParametersUpdateResponse configurationParametersUpdate(String resourceId,
String configType,
File resourceFile)
throws Exception
- Throws:
Exception
configurationParametersUpdate
public ConfigurationParametersUpdateResponse configurationParametersUpdate(String resourceId,
String configType,
ConfigParameters model)
throws Exception
- Updates the configuration of the given resource from the configuration object model.
- Throws:
Exception
configurationParametersDelete
public ConfigurationParametersDeleteResponse configurationParametersDelete(String resourceId,
String configType)
throws Exception
- Throws:
Exception
configurationParameters
public ConfigurationParametersResponse configurationParameters(String resourceId,
String configType)
throws Exception
- Throws:
Exception
configurationParametersAsObject
public ConfigParameters configurationParametersAsObject(String resourceId,
String configType)
throws Exception
- Perform
configurationParameters(String, String) and obtains the result as a data-bound object.
- Throws:
Exception
serviceList
public ServiceListResponse serviceList(String account)
throws Exception
- Throws:
Exception
serviceSubscribe
public ServiceSubscriptionInfo serviceSubscribe(String service,
String plan,
String account,
Map<String,String> settings)
throws Exception
- Throws:
Exception
serviceUnSubscribe
public ServiceSubscriptionDeleteResponse serviceUnSubscribe(String service,
String subscriptionId)
throws Exception
- Throws:
Exception
serviceSubscriptionUpdate
public ServiceSubscriptionInfo serviceSubscriptionUpdate(String service,
String plan,
String subscriptionId,
Map<String,String> settings)
throws Exception
- Throws:
Exception
serviceSubscriptionInfo
public ServiceSubscriptionInfo serviceSubscriptionInfo(String service,
String subscriptionId)
throws Exception
- Throws:
Exception
serviceSubscriptionList
public ServiceSubscriptionListResponse serviceSubscriptionList(String account)
throws Exception
- Throws:
Exception
serviceResourceInfo
public ServiceResourceInfo serviceResourceInfo(String service,
String resourceId)
throws Exception
- Throws:
Exception
serviceResourceList
public ServiceResourceListResponse serviceResourceList(String service,
String account,
String resourceType)
throws Exception
- Throws:
Exception
resourceBindingList
public ServiceResourceBindingListResponse resourceBindingList(String service,
String resourceId)
throws Exception
- Throws:
Exception
resourceBindingList
public ServiceResourceBindingListResponse resourceBindingList(String service,
String resourceId,
boolean bidirectional)
throws Exception
- Throws:
Exception
accountRegionList
public AccountRegionListResponse accountRegionList(String account,
String service)
throws Exception
- Throws:
Exception
applicationInstanceList
public ApplicationInstanceListResponse applicationInstanceList(String appId)
throws Exception
- Throws:
Exception
applicationInstanceReplace
public ApplicationInstanceStatusResponse applicationInstanceReplace(String instanceId)
throws Exception
- Throws:
Exception
applicationInstanceRestart
public ApplicationInstanceStatusResponse applicationInstanceRestart(String instanceId)
throws Exception
- Throws:
Exception
applicationInstanceDelete
public ApplicationInstanceStatusResponse applicationInstanceDelete(String instanceId)
throws Exception
- Throws:
Exception
applicationInstanceTagsUpdate
public ApplicationInstanceInfo applicationInstanceTagsUpdate(String instanceId,
Map<String,String> tags,
boolean replace)
throws Exception
- Throws:
Exception
applicationInstanceInfo
public ApplicationInstanceInfo applicationInstanceInfo(String instanceId)
throws Exception
- Throws:
Exception
applicationInstanceInvoke
public ApplicationInstanceInvokeResponse applicationInstanceInvoke(String instanceId,
String invoke,
Map<String,String> parameters)
throws Exception
- Throws:
Exception
applicationInstanceTailLog
public void applicationInstanceTailLog(String instanceId,
String logName,
OutputStream out)
throws Exception
- Throws:
Exception
applicationSnapshotList
public ApplicationSnapshotListResponse applicationSnapshotList(String appId)
throws Exception
- Throws:
Exception
applicationSnapshotDelete
public ApplicationSnapshotStatusResponse applicationSnapshotDelete(String snapshotId)
throws Exception
- Throws:
Exception
applicationSnapshotInfo
public ApplicationSnapshotInfo applicationSnapshotInfo(String snapshotId)
throws Exception
- Throws:
Exception
applicationSnapshotUpdate
public ApplicationSnapshotStatusResponse applicationSnapshotUpdate(String snapshotId,
Map<String,String> parameters)
throws Exception
- Throws:
Exception
applicationProxyUpdate
public ApplicationStatusResponse applicationProxyUpdate(String appId,
Map<String,String> parameters)
throws Exception
- Throws:
Exception
applicationConfigUpdate
public ApplicationConfigUpdateResponse applicationConfigUpdate(String appId,
Map<String,String> parameters)
throws Exception
- Throws:
Exception
resourceBind
public ServiceResourceBindResponse resourceBind(String fromService,
String fromResourceId,
String toService,
String toResourceId,
String alias,
Map<String,String> settings)
throws Exception
- Throws:
Exception
resourceUnBind
public ServiceResourceUnBindResponse resourceUnBind(String service,
String resourceId,
String alias)
throws Exception
- Throws:
Exception
serviceResourceCreate
public ServiceResourceInfo serviceResourceCreate(String service,
String account,
String resourceType,
String resourceName,
Map<String,String> settings)
throws Exception
- Throws:
Exception
serviceResourceUpdate
public ServiceResourceInfo serviceResourceUpdate(String service,
String resourceId,
Map<String,String> settings)
throws Exception
- Throws:
Exception
serviceResourceDelete
public ServiceResourceDeleteResponse serviceResourceDelete(String service,
String resourceId)
throws Exception
- Throws:
Exception
executeRequest
public String executeRequest(String url)
throws Exception
- Overrides:
executeRequest in class com.cloudbees.api.BeesClientBase
- Throws:
Exception
executeUpload
protected String executeUpload(String uploadURL,
Map<String,String> params,
Map<String,File> files,
com.cloudbees.api.UploadProgress writeListener)
throws Exception
- Overrides:
executeUpload in class com.cloudbees.api.BeesClientBase
- Throws:
Exception
getAppConfig
protected static ApplicationConfiguration getAppConfig(File deployZip,
String[] environments,
String[] implicitEnvironments)
throws IOException
- Throws:
IOException
createParameter
protected String createParameter(Map<String,String> parameters)
tailLog
public void tailLog(String appId,
String logName,
OutputStream out)
throws Exception
- Throws:
Exception
apiCall
protected Object apiCall(String apiMethod,
Map<String,String> settings,
Map<String,String> params)
throws Exception
- Throws:
Exception
call
public String call(String action,
Map<String,String> params)
throws Exception
- Throws:
Exception
getXStream
protected com.thoughtworks.xstream.XStream getXStream()
throws Exception
- Throws:
Exception
readResponse
protected Object readResponse(String response)
throws Exception
- Throws:
Exception
encodePassword
public static String encodePassword(String password,
String version)
mainCall
public void mainCall(String[] args)
throws Exception
- Throws:
Exception
main
public void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2011-2013. All Rights Reserved.