POSThttps://api.spotinst.io/ocean/aws/ecs/cluster/{OCEAN_CLUSTER_ID}/roll?accountId={ACCOUNT_ID}

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceIds. Performing this request will start the roll immediately, by defined batches.

Note that the first response for a successful request will notify for starting a roll. In order to check the status of a roll, you can use the GET Roll API using the roll ID.

URL Parameters

Parameter Type Description
OCEAN_CLUSTER_ID * String

The Ocean cluster to roll.

ACCOUNT_ID * String

Your Spot accountId associated with your token.

Request - Example 1: Initiate Cluster Roll

Headers
Copied!
Downloaded!
{
  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{ 
	"roll" : 
	{
		"batchSizePercentage" : 20,
		"comment": "This is why I deployed my cluster."
	}
}
Request - Example 2: Initiate Roll per launchSpecIds

Headers
Copied!
Downloaded!
{
  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
 "roll": 
   {
     "launchSpecIds" : ["ols-76694a7d", "ols-56694a76"],
     "batchSizePercentage": 20,
     "comment": "This is why I deployed my cluster."
    }
}
Request - Example 3: Initiate Roll per instanceIds

Headers
Copied!
Downloaded!
{
  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
 "roll": 
   {
     "instanceIds" : ["i-0003a99ffb566f039", "i-0567a99ffb566f765"],
     "batchSizePercentage": 20,
     "comment": "This is why I deployed my cluster."
    }
}
Attribute Type Description
roll Object

Settings for roll operation

roll.batchSizePercentage Integer

Value in % to set size of batch in roll. Valid values are 0-100

Example: 20
roll.comment String

Add a comment description for the roll. comment should be limit to 256 chars.

roll.launchSpecIds Array<String>

List of launch specification IDs to be rolled. Each ID is a string. launchSpecIds can be null. Cannot be used together with instanceIds.

Example: "ols-76694a7d", "ols-56694a76"
roll.instanceIds Array<String>

List of instance IDs to be rolled. Each ID is a string. instanceIds can be null. Cannot be used together with launchSpecIds.

Example: "i-0003a99ffb566f039", "i-0567a99ffb566f765"
Response - 200 for Initiate Cluster Roll

Body
Copied!
Downloaded!
{
    "id": "scr-5aaf854e",
    "status": "STARTING",
    "currentBatch": 1,
	"numOfBatches": 5,
	"comment": "This is why I deployed my cluster.",
    "progress": {
   		"unit": "percentage",
        "value": 0
	},
    "oceanId": "o-12e31234",
    "createdAt": "2019-03-24T15:46:09.000Z",
    "updatedAt": "2019-03-24T15:46:09.000Z"
 }
Response - 200 for Initiate Roll per launchSpecIds

Body
Copied!
Downloaded!
{
  "id": "scr-12345678",
  "status": "Starting",
  "currentBatch": 1,
  "numOfBatches": 5,
  "comment" : "This is why I deployed my cluster.",
  "progress": {
    "unit": "percentage",
    "value": 10
  },
  "oceanId": "o-12345678",
  "launchSpecIds": ["ols-76694a7d", "ols-56694a76"],
  "createdAt": "2019-03-24T15:50:09.000Z",
  "updatedAt": "2019-03-24T15:46:09.000Z"
}
Response - 200 for Initiate Roll per instanceIds

Body
Copied!
Downloaded!
{
  "id": "scr-12345678",
  "status": "Starting",
  "currentBatch": 1,
  "numOfBatches": 5,
  "comment" : "This is why I deployed my cluster.",
  "progress": {
    "unit": "percentage",
    "value": 10
  },
  "oceanId": "o-12345678",
  "instanceIds": ["i-0003a99ffb566f039", "i-0567a99ffb566f765"],
  "createdAt": "2019-03-24T15:50:09.000Z",
  "updatedAt": "2019-03-24T15:46:09.000Z"
}