Skip to main content

droplet_autoscale_pool_history

Creates, updates, deletes, gets or lists a droplet_autoscale_pool_history resource.

Overview

Namedroplet_autoscale_pool_history
TypeResource
Iddigitalocean.compute.droplet_autoscale_pool_history

Fields

The following fields are returned by SELECT queries:

A JSON object with a key of history.

NameDatatypeDescription
history_event_idstringThe unique identifier of the history event. (example: 01936530-4471-7b86-9634-32d8fcfecbc6)
created_atstring (date-time)The creation time of the history event in ISO8601 combined date and time format. (example: 2020-07-28T18:00:00Z)
current_instance_countintegerThe current number of Droplets in the autoscale pool.
desired_instance_countintegerThe target number of Droplets for the autoscale pool after the scaling event.
reasonstringThe reason for the scaling event. (example: CONFIGURATION_CHANGE)
statusstringThe status of the scaling event. (example: success)
updated_atstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
autoscalepools_list_historyselectautoscale_pool_idper_page, pageTo 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.

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.

NameDatatypeDescription
autoscale_pool_idstringA unique identifier for an autoscale pool. (example: 0d3db13e-a604-4944-9827-7ec2642d32ac)
pageintegerWhich 'page' of paginated results to return. (example: 1)
per_pageintegerNumber of items returned per page (example: 2)

SELECT examples

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 }}';