PUThttps://api.spotinst.io/azure/compute/group/{GROUP_ID}/scale/down?accountId={ACCOUNT_ID}&adjustment=5

 

       Scale down virtual machines in Elastigroup cluster.

URL Parameters

Parameter Type Description
GROUP_ID * String

The ID of the Elastigroup to list.

ACCOUNT_ID * String

Your Spot accountId associated with your token.

Example: act-123abc
adjustment * Integer

Number of VMs to scale down

Example: 5
Request

Headers
Copied!
Downloaded!
{  
   "Content-Type": "application/json",
   "Authorization": "Bearer ${token}" 
}

Boday Parameters


Attribute Type Description
virtualMachinesToDetach * Array<String>

Names of virtual machines to detach. Not empty.

Example: vm01
shouldTerminateVirtualMachines * Boolean

Indicates whether to terminate the VMs or not.

Example: true
shouldDecrementTargetCapacity * Boolean

Prevent Elastigroup from scaling back to target capacity when virtual machines are detached.

Example: true
drainingTimeout String

The time in seconds to allow the virtual machine be be drained from incoming TCP connections and detached from MLB before terminating it.

Example: 300
Default: 300
Response - Response: 200

Body
Copied!
Downloaded!
  "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:azure:compute:group:status",
        "items": [
                  {
                    "vmName" : "vm-12345",
                    "region" : "eastus",
                    "vmSize" : "standard_b1ls",
                    "lifeCycle": "spot",
                    "os" : "Linux",
                    "privateIp" : "192.0.0.1",
                    "publicIp" : "183.123.67.79",
                    "provisioningState" : "succeeded",
                    "powerState" : "running",
                    "createdAt" : "2020-06-18T12:02:49.000Z"
                  },
                  {
                    "vmName" : "vm-12346",
                    "region" : "eastus",
                    "vmSize" : "standard_b1ls",
                    "lifeCycle": "od",
                    "os" : "Linux",
                    "privateIp" : "192.0.0.2",
                    "publicIp" : "183.123.67.89",
                    "provisioningState" : "succeeded",
                    "powerState" : "running",
                    "createdAt" : "2020-06-18T11:40:57.000Z"
                  }
                
        ],
        "count": 2
    }