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

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceNames. 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 Cluster 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 instanceNames

Headers
Copied!
Downloaded!
{
  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
 "roll": 
   {
     "instanceNames" : ["sin-0a4becc0-sig-6952238d", "sin-0542ecc0-sig-695223r4"],
     "batchSizePercentage": 20,
     "comment": "This is why I deployed my cluster."
    }
}
Attribute Type Description
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 instanceName.

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

List of instance names to be rolled. Each name is a string. instanceNames can be null. Cannot be used together with launchSpecIds.

Example: "sin-0a4becc0-sig-6952238d", "sin-0542ecc0-sig-695223r4"
Response - 200 for Initiate Cluster Roll

Body
Copied!
Downloaded!
{
    "rollId": "roll-1234",
    "oceanId": "o-12e31234",
	"progress": {
   		"unit": "percentage",
        "value": 0
	},
    "status": "STARTING",
    "batchNumber": 1,
	"numOfBatches": 5,
    "comment" : "This is why I deployed my cluster.",
    "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 instanceNames

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",
  "instanceNames": ["sin-0a4becc0-sig-6952238d", "sin-0542ecc0-sig-695223r4"],
  "createdAt": "2019-03-24T15:50:09.000Z",
  "updatedAt": "2019-03-24T15:46:09.000Z"
}