actions
Creates, updates, deletes, gets or lists a actions
resource.
Overview
Name | actions |
Type | Resource |
Id | digitalocean.images.actions |
Fields
Name | Datatype | Description |
---|---|---|
id | integer | A unique numeric ID that can be used to identify and reference an action. |
completed_at | string | A time value given in ISO8601 combined date and time format that represents when the action was completed. |
region | object | |
region_slug | string | A human-readable string that is used as a unique identifier for each region. |
resource_id | integer | A unique identifier for the resource that the action is associated with. |
resource_type | string | The type of resource that the action is associated with. |
started_at | string | A time value given in ISO8601 combined date and time format that represents when the action was initiated. |
status | string | The current status of the action. This can be "in-progress", "completed", or "errored". |
type | string | This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
image_actions_get | SELECT | action_id, image_id | To retrieve the status of an image action, send a GET request to /v2/images/$IMAGE_ID/actions/$IMAGE_ACTION_ID . |
image_actions_list | SELECT | image_id | To retrieve all actions that have been executed on an image, send a GET request to /v2/images/$IMAGE_ID/actions . |
image_actions_post | EXEC | image_id | The following actions are available on an Image. ## Convert an Image to a Snapshot To convert an image, for example, a backup to a snapshot, send a POST request to /v2/images/$IMAGE_ID/actions . Set the type attribute to convert . ## Transfer an Image To transfer an image to another region, send a POST request to /v2/images/$IMAGE_ID/actions . Set the type attribute to transfer and set region attribute to the slug identifier of the region you wish to transfer to. |
SELECT
examples
To retrieve all actions that have been executed on an image, send a GET request to /v2/images/$IMAGE_ID/actions
.
SELECT
id,
completed_at,
region,
region_slug,
resource_id,
resource_type,
started_at,
status,
type
FROM digitalocean.images.actions
WHERE image_id = '{{ image_id }}';