Manage Cloud Profiles
This article lists REST API requests concerning cloud profiles.
Get Cloud Profiles
To get a list of all available cloud profiles, use:
To get a specific profile, use:
where cloudProfileLocator
is typed as CloudProfileLocator.
For example, to get profiles belonging to the MyProject
project, use:
Get Cloud Images
To get cloud images, use:
This call, similarly to the above, supports the locator parameter:
Here, cloudImageLocator
is typed as CloudImageLocator.
For example, to get cloud image with ID my-ec2-image
under amazon-1
cloud profile, use:
Get Cloud Instances
To get cloud instances, use:
This call, similarly to the above, supports the locator parameter:
where cloudInstanceLocator
is typed as CloudInstanceLocator.
To extend previous example, use the following request to get cloud instance i-0a7c2f04a1e58ca53
started from my-ec2-image
under amazon-1
cloud profile:
Start and Stop Cloud Instances
To start a new cloud instance, use:
The request accepts the following payload:
To stop a running cloud instance, send a POST request to either /app/rest/cloud/instances/<cloudInstanceLocator>/actions/stop
or /app/rest/cloud/instances/<cloudInstanceLocator>/actions/forceStop
endpoint.
The .../actions/stop
endpoint requests ensure that agents are not terminated during a build. Use this endpoint to tell an agent it should stop after finishing its current tasks.
To immediately wind down a cloud agent even if it's currently busy, send a POST request to the .../actions/forceStop
endpoint (recommended), or a DELETE request to the /app/rest/cloud/instances/<cloudInstanceLocator>
endpoint.