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

    Update one or more parameters in your Elastigroup Use the Elastigroup Json in the body to update the Elastigroup. Only the specified fields will apply.

URL Parameters

Parameter Type Description
GROUP_ID * String

The Elasticgroup id you want to update

Example: sig-12345
ACCOUNT_ID String

Your Spotinst accountid associated with your token

Example: act-123abc
Request - Update group

Headers
{  
   "Content-Type": "application/json",
   "Authorization": "Bearer ${token}" 
}
Body
Copied!
Downloaded!
{
  "group": {
    "name": "spotinst-group",
    "strategy": {
      "lowPriorityPercentage": null,
      "dedicatedCount": 2,
  "drainingTimeout": 60,
   "signals":
  [
   {
    "name": "NODE_READY",
    "timeout" 100
   }
  ]
        },
        "capacity": {
          "target": 0,
          "minimum": 0,
          "maximum": 0
        },
        "compute": {
          "vmSizes": {
              "dedicatedSizes": [
                        "Standard_A1",
                        "Standard_A3"
              ],
            "lowPrioritySizes": [
                        "Standard_A1",
                        "Standard_A5"
            ]
          },
          "health": {
                "healthCheckType": "nodeState",
                "autoHealing": false,
                "gracePeriod": 100
          },
        }
        "scaling": {
          "up": [
            {
              "namespace": "AZURE/NODE",
              "metricName": "CPUUtilization",
              "statistic": "average",
              "unit": "percent",
              "threshold": 90,
              "dimensions": [
                {
                  "name": "nodeId"
                  "value" : 1
                }
              ],
              "period": 300,
              "evaluationPeriods": 1,
              "cooldown": 300,
              "action": {
                "type": "percentageAdjustment",
                "adjustment": 20,
                "minTargetCapacity": 2,
                "target": 5,
                "minimum": 5,
                "maximum": 5
              },
              "operator": "minTargetCapacity"
            }
          ],
          "down": [
            {
              "namespace": "AZURE/NODE",
              "metricName": "CPUUtilization",
              "statistic": "average",
              "unit": "percent",
              "threshold": 90,
              "dimensions": [
                {
                  "name": "nodeId"
                  "value" : 1
                }
              ],
              "period": 300,
              "evaluationPeriods": 1,
              "cooldown": 300,
              "action": {
                "type": "percentageAdjustment",
                "adjustment": 20,
                "minTargetCapacity": 2,
                "target": 5,
                "minimum": 5,
                "maximum": 5
              },
              "operator": "minTargetCapacity"
            }
          ]
        },
        "scheduling": {
          "tasks": [
            {
              "frequency": "hourly",
              "taskType": "scale"
            },
            {
              "taskType": "roll",
              "cronExpression": "00 17 * * 3",
              "batchSizePercentage": 30
            },
            {
              "taskType": "scale",
              "cronExpression": "00 22 * * 3",
              "scaleTargetCapcity": 0,
              "scaleMinCapcity": 0,
              "scaleMaxCapcity": 3
            }
          ]
        }
      }
    }
Response - 200

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