droplet_autoscale_pools
Creates, updates, deletes, gets or lists a droplet_autoscale_pools
resource.
Overview
Name | droplet_autoscale_pools |
Type | Resource |
Id | digitalocean.compute.droplet_autoscale_pools |
Fields
The following fields are returned by SELECT
queries:
- autoscalepools_get
- autoscalepools_list
The response will be a JSON object with a key called autoscale_pool
. This will be
set to a JSON object that contains the standard autoscale pool attributes.
Name | Datatype | Description |
---|---|---|
id | string | A unique identifier for each autoscale pool instance. This is automatically generated upon autoscale pool creation. (example: 0d3db13e-a604-4944-9827-7ec2642d32ac) |
name | string | The human-readable name set for the autoscale pool. (example: my-autoscale-pool) |
active_resources_count | integer | The number of active Droplets in the autoscale pool. |
config | object | The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). |
created_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the autoscale pool was created. (title: The creation time of the autoscale pool, example: 2020-07-28T18:00:00Z) |
current_utilization | object | |
droplet_template | object | |
status | string | The current status of the autoscale pool. (example: active) |
updated_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the autoscale pool was last updated. (title: When the autoscale pool was last updated, example: 2020-07-28T18:00:00Z) |
A JSON object with a key of autoscale_pools
.
Name | Datatype | Description |
---|---|---|
id | string | A unique identifier for each autoscale pool instance. This is automatically generated upon autoscale pool creation. (example: 0d3db13e-a604-4944-9827-7ec2642d32ac) |
name | string | The human-readable name set for the autoscale pool. (example: my-autoscale-pool) |
active_resources_count | integer | The number of active Droplets in the autoscale pool. |
config | object | The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). |
created_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the autoscale pool was created. (title: The creation time of the autoscale pool, example: 2020-07-28T18:00:00Z) |
current_utilization | object | |
droplet_template | object | |
status | string | The current status of the autoscale pool. (example: active) |
updated_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the autoscale pool was last updated. (title: When the autoscale pool was last updated, example: 2020-07-28T18:00:00Z) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
autoscalepools_get | select | autoscale_pool_id | To show information about an individual autoscale pool, send a GET request to/v2/droplets/autoscale/$AUTOSCALE_POOL_ID . | |
autoscalepools_list | select | per_page , page , name | To list all autoscale pools in your team, send a GET request to /v2/droplets/autoscale .The response body will be a JSON object with a key of autoscale_pools containing an array of autoscale pool objects.These each contain the standard autoscale pool attributes. | |
autoscalepools_create | insert | data__name , data__config , data__droplet_template | To create a new autoscale pool, send a POST request to /v2/droplets/autoscale setting the required attributes.The response body will contain a JSON object with a key called autoscale_pool containing the standard attributes for the new autoscale pool. | |
autoscalepools_update | replace | autoscale_pool_id , data__name , data__config , data__droplet_template | 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 representationof the autoscale pool including existing attributes. | |
autoscalepools_delete | delete | autoscale_pool_id | To destroy an autoscale pool, send a DELETE request to the /v2/droplets/autoscale/$AUTOSCALE_POOL_ID endpoint.A successful response will include a 202 response code and no content. | |
autoscalepools_delete_dangerous | exec | autoscale_pool_id , X-Dangerous | To destroy an autoscale pool and its associated resources (Droplets), send a DELETE request to the /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/dangerous endpoint. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
X-Dangerous | boolean | Acknowledge this action will destroy the autoscale pool and its associated resources and can not be reversed. (example: true) |
autoscale_pool_id | string | A unique identifier for an autoscale pool. (example: 0d3db13e-a604-4944-9827-7ec2642d32ac) |
name | string | The name of the autoscale pool (example: my-autoscale-pool) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT
examples
- autoscalepools_get
- autoscalepools_list
To show information about an individual autoscale pool, send a GET request to/v2/droplets/autoscale/$AUTOSCALE_POOL_ID
.
SELECT
id,
name,
active_resources_count,
config,
created_at,
current_utilization,
droplet_template,
status,
updated_at
FROM digitalocean.compute.droplet_autoscale_pools
WHERE autoscale_pool_id = '{{ autoscale_pool_id }}' -- required;
To list all autoscale pools in your team, send a GET request to /v2/droplets/autoscale
.
The response body will be a JSON object with a key of autoscale_pools
containing an array of autoscale pool objects.
These each contain the standard autoscale pool attributes.
SELECT
id,
name,
active_resources_count,
config,
created_at,
current_utilization,
droplet_template,
status,
updated_at
FROM digitalocean.compute.droplet_autoscale_pools
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
AND name = '{{ name }}';
INSERT
examples
- autoscalepools_create
- Manifest
To create a new autoscale pool, send a POST request to /v2/droplets/autoscale
setting the required attributes.
The response body will contain a JSON object with a key called autoscale_pool
containing the standard attributes for the new autoscale pool.
INSERT INTO digitalocean.compute.droplet_autoscale_pools (
data__name,
data__config,
data__droplet_template
)
SELECT
'{{ name }}' --required,
'{{ config }}' --required,
'{{ droplet_template }}' --required
RETURNING
autoscale_pool
;
# Description fields are for documentation purposes
- name: droplet_autoscale_pools
props:
- name: name
value: string
description: >
The human-readable name of the autoscale pool. This field cannot be updated
- name: config
value: object
description: >
The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration).
- name: droplet_template
value: object
REPLACE
examples
- autoscalepools_update
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.
REPLACE digitalocean.compute.droplet_autoscale_pools
SET
data__name = '{{ name }}',
data__config = '{{ config }}',
data__droplet_template = '{{ droplet_template }}'
WHERE
autoscale_pool_id = '{{ autoscale_pool_id }}' --required
AND data__name = '{{ name }}' --required
AND data__config = '{{ config }}' --required
AND data__droplet_template = '{{ droplet_template }}' --required
RETURNING
autoscale_pool;
DELETE
examples
- autoscalepools_delete
To destroy an autoscale pool, send a DELETE request to the /v2/droplets/autoscale/$AUTOSCALE_POOL_ID
endpoint.
A successful response will include a 202 response code and no content.
DELETE FROM digitalocean.compute.droplet_autoscale_pools
WHERE autoscale_pool_id = '{{ autoscale_pool_id }}' --required;
Lifecycle Methods
- autoscalepools_delete_dangerous
To destroy an autoscale pool and its associated resources (Droplets),
send a DELETE request to the /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/dangerous
endpoint.
EXEC digitalocean.compute.droplet_autoscale_pools.autoscalepools_delete_dangerous
@autoscale_pool_id='{{ autoscale_pool_id }}' --required,
@X-Dangerous='{{ X-Dangerous }}' --required;