Update
Update Autoscale Pool
put/v2/droplets/autoscale/{autoscale_pool_id}
To update the configuration of an existing autoscale pool, send a PUT request to
/v2/droplets/autoscale/$AUTOSCALE_POOL_ID
. The request must contain a full representation
of the autoscale pool including existing attributes.
Path Parameters
autoscale_pool_idstring
Body Parameters
configunion
The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration).
One of the following 2 object variants:
droplet_templateimagestringregionenumsizestringssh_keysarray of stringipv6booleannamestringproject_idstringtagsarray of stringuser_datastringvpc_uuidstringwith_droplet_agentbooleanAutoscalePoolDropletTemplate
namestring
The human-readable name of the autoscale pool. This field cannot be updated
Returns
autoscale_poolidstringactive_resources_countnumberconfigunioncreated_atstringdroplet_templateAutoscalePoolDropletTemplatenamestringstatusenumupdated_atstringcurrent_utilizationCurrentUtilizationAutoscalePool
optional
curl https://api.digitalocean.com//v2/droplets/autoscale/$AUTOSCALE_POOL_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GRADIENTAI_API_KEY" \
-d '{
"config": {
"target_number_instances": 2
},
"droplet_template": {
"image": "ubuntu-20-04-x64",
"region": "nyc3",
"size": "c-2",
"ssh_keys": [
"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"
],
"ipv6": true,
"name": "example.com",
"tags": [
"env:prod",
"web"
],
"user_data": "#cloud-config\\nruncmd:\\n - touch /test.txt\\n",
"vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000"
},
"name": "my-autoscale-pool"
}'
200 Example
{
"autoscale_pool": {
"id": "0d3db13e-a604-4944-9827-7ec2642d32ac",
"name": "test-autoscaler-group-01",
"config": {
"min_instances": 1,
"max_instances": 5,
"target_cpu_utilization": 0.5,
"cooldown_minutes": 10
},
"droplet_template": {
"name": "droplet-name",
"size": "c-2",
"region": "tor1",
"image": "ubuntu-20-04-x64",
"tags": [
"my-tag"
],
"ssh_keys": [
"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"
],
"vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000",
"with_droplet_agent": true,
"project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988",
"ipv6": true,
"user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n"
},
"created_at": "2020-11-19T20:27:18Z",
"updated_at": "2020-12-01T00:42:16Z",
"status": "active",
"active_resources_count": 1
}
}