fbpx
PUThttps://api.spotinst.io/azure/compute/task/{TASK_ID}?accountId={ACCOUNT_ID}

Update existing Task

URL Parameters

Parameter Type Description
TASK_ID * String

The task id you want to update

Example: sat-65432
ACCOUNT_ID String

Your Spotinst accountid associated with your token

Example: act-123abc
Request - Update instances

Headers
{  
   "Content-Type": "application/json",
   "Authorization": "Bearer ${token}" 
}
Body
Copied!
Downloaded!
{
  "instances": [
    {
      "vmName": "MyVm1",
      "resourceGroupName": "MyGroup1"
    },
    {
      "vmName": "MyVm2",
      "resourceGroupName": "MyGroup2"
    }
  ]
}
Request - Update State

Headers
{  
   "Content-Type": "application/json",
   "Authorization": "Bearer ${token}" 
}
Body
Copied!
Downloaded!
{
  "state": "ENABLED"
}
Response - 200

Headers
{  
  "Content-Type": "application/json" 
}