Cloud Management API 1.5

CloudAccounts

Represents a Cloud Account (An association between the account and a cloud).

Actions

index

Lists all the CloudAccounts available to this Account.

URLs
GET /api/cloud_accounts
HTTP response code
200 OK
Content-type
application/vnd.rightscale.cloud_account;type=collection

Required roles

Example Responses

Click on a format below to see an example response:

JSON XML
[{
  "created_at": "2023/10/09 11:06:00 +0000",
  "updated_at": "2023/10/09 11:06:00 +0000",
  "links": [
    {"rel":"self","href":"/api/cloud_accounts/7773"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"account","href":"/api/accounts/560182816"}
  ]
},{
  "created_at": "2023/10/09 11:06:00 +0000",
  "updated_at": "2023/10/09 11:06:00 +0000",
  "links": [
    {"rel":"self","href":"/api/cloud_accounts/7773"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"account","href":"/api/accounts/560182816"}
  ]
}]
<?xml version="1.0" encoding="UTF-8"?>
<cloud_accounts>
  <cloud_account>
    <created_at>2023/10/09 11:06:00 +0000</created_at>
    <updated_at>2023/10/09 11:06:00 +0000</updated_at>
    <links>
      <link rel="self" href="/api/cloud_accounts/7773"/>
      <link rel="cloud" href="/api/clouds/888"/>
      <link rel="account" href="/api/accounts/560182816"/>
    </links>
  </cloud_account>
  <cloud_account>
    <created_at>2023/10/09 11:06:00 +0000</created_at>
    <updated_at>2023/10/09 11:06:00 +0000</updated_at>
    <links>
      <link rel="self" href="/api/cloud_accounts/7773"/>
      <link rel="cloud" href="/api/clouds/888"/>
      <link rel="account" href="/api/accounts/560182816"/>
    </links>
  </cloud_account>
</cloud_accounts>

show

URLs
GET /api/cloud_accounts/:id
HTTP response code
200 OK
Content-type
application/vnd.rightscale.cloud_account

Required roles

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "created_at": "2023/10/09 11:06:00 +0000",
  "updated_at": "2023/10/09 11:06:00 +0000",
  "links": [
    {"rel":"self","href":"/api/cloud_accounts/7773"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"account","href":"/api/accounts/560182816"}
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<cloud_account>
  <created_at>2023/10/09 11:06:00 +0000</created_at>
  <updated_at>2023/10/09 11:06:00 +0000</updated_at>
  <links>
    <link rel="self" href="/api/cloud_accounts/7773"/>
    <link rel="cloud" href="/api/clouds/888"/>
    <link rel="account" href="/api/accounts/560182816"/>
  </links>
</cloud_account>

create

Register a cloud account/subscription/project with a RightScale account. Not all clouds support API-based registration.

creds by cloud type

AWS cloud: aws_account_number, aws_access_key_id, aws_secret_access_key, ec2_key (optional), ec2_cert (optional)

AzureRM cloud: client_id, client_secret, tenant_id, subscription_id

Google cloud: project, client_email (optional), private_key (optional), json (optional)

SoftLayer cloud: api_key, username

For more information on the supported clouds and their respective parameters, refer to the following:

http://docs.rightscale.com/api/api_1.5_examples/cloudaccounts.html

URLs
POST /api/cloud_accounts
HTTP response code
201 Created
Location
Href of created CloudAccount

Required roles

Parameters

name required type values regexp blank? description
cloud_account yes Hash * * no
cloud_account[cloud_href] no String * * no The href of the cloud if it is known. For valid values see support portal link above.
cloud_account[creds] yes Hash * * no
cloud_account[creds][*] no String * * no The * denotes that the key could be anything, limited to the required parameters for the respective cloud. See the description above.
cloud_account[token] no String * * no The cloud token to identify a private cloud

update

Update credentials for a registered cloud account/subscription/project. Not all clouds support API-based credential update.

creds by cloud type

AzureRM cloud: client_id (optional), client_secret (optional), tenant_id (optional)

Google cloud: client_email (optional), private_key (optional), json (optional)

For more information on the supported clouds and their respective parameters, refer to the following:

http://docs.rightscale.com/api/api_1.5_examples/cloudaccounts.html

URLs
PUT /api/cloud_accounts/:id
HTTP response code
204 No Content

Required roles

Parameters

name required type values regexp blank? description
cloud_account yes Hash * * no
cloud_account[creds] yes Hash * * no
cloud_account[creds][*] no String * * no The * denotes that the key could be anything limited to the required parameters for the respective cloud. See the description above.

destroy

Delete a CloudAccount.

URLs
DELETE /api/cloud_accounts/:id
HTTP response code
204 No Content

Required roles