droplet_autoscale_pool_history
Creates, updates, deletes, gets or lists a droplet_autoscale_pool_history
resource.
Overview
Name | droplet_autoscale_pool_history |
Type | Resource |
Id | digitalocean.compute.droplet_autoscale_pool_history |
Fields
The following fields are returned by SELECT
queries:
- autoscalepools_list_history
A JSON object with a key of history
.
Name | Datatype | Description |
---|---|---|
history_event_id | string | The unique identifier of the history event. (example: 01936530-4471-7b86-9634-32d8fcfecbc6) |
created_at | string (date-time) | The creation time of the history event in ISO8601 combined date and time format. (example: 2020-07-28T18:00:00Z) |
current_instance_count | integer | The current number of Droplets in the autoscale pool. |
desired_instance_count | integer | The target number of Droplets for the autoscale pool after the scaling event. |
reason | string | The reason for the scaling event. (example: CONFIGURATION_CHANGE) |
status | string | The status of the scaling event. (example: success) |
updated_at | string (date-time) | The last updated time of the history event in ISO8601 combined date and time format. (example: 2020-07-28T18:00:00Z) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
autoscalepools_list_history | select | autoscale_pool_id | per_page , page | To list all of the scaling history events of an autoscale pool, send a GET request to /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/history .The response body will be a JSON object with a key of history . This will beset to an array containing objects each representing a history event. |
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 |
---|---|---|
autoscale_pool_id | string | A unique identifier for an autoscale pool. (example: 0d3db13e-a604-4944-9827-7ec2642d32ac) |
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_list_history
To list all of the scaling history events of an autoscale pool, send a GET request to /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/history
.
The response body will be a JSON object with a key of history
. This will be
set to an array containing objects each representing a history event.
SELECT
history_event_id,
created_at,
current_instance_count,
desired_instance_count,
reason,
status,
updated_at
FROM digitalocean.compute.droplet_autoscale_pool_history
WHERE autoscale_pool_id = '{{ autoscale_pool_id }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}';