fbpx
POSThttps://api.spotinst.io/setup/credentials/aws?accountId={ACCOUNT_ID}

Link a Spotinst account to an AWS Cloud account.

Parameter Type Description
ACCOUNT_ID * String

The Account id you want to update

Example: act-12345
Attribute Type Description
credentials.iamRole * String

Provide the iamRole ARN with the latest Spotinst Policy

Example: arn:aws:iam::1234567890:role/Spotinst_Iam_Role
credentials.externalId * String

Provide the External ID used while setting up the IAM Role. This should be a random string of your choice.

Example: 1a2b3c4d5e6f7g8h9i0g
Request

Headers
Content-Type: application/json
Authorization: Bearer ${token}
Body
Copied!
Downloaded!
{
  "credentials": {
    "iamRole": "arn:aws:iam::1234567890:role/Spotinst_Iam_Role",
    "externalId": "1a2b3c4d5e6f7g8h9i0g"
  }
}
Response

Headers
Content-Type: application/json
Body
Copied!
Downloaded!
{
  "request": {
    "id": "8a8a3f88-7620-4783-bf00-953e0b8892fe",
    "url": "/setup/credentials/aws?accountId=act-123456",
    "method": "POST",
    "timestamp": "2017-10-17T10:43:54.421Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    }
  }
}