Skip to main content

actions

Overview

Nameactions
TypeResource
Iddigitalocean.images.actions

Fields

NameDatatypeDescription
idintegerA unique numeric ID that can be used to identify and reference an action.
completed_atstringA time value given in ISO8601 combined date and time format that represents when the action was completed.
regionobject
region_slugstringA human-readable string that is used as a unique identifier for each region.
resource_idintegerA unique identifier for the resource that the action is associated with.
resource_typestringThe type of resource that the action is associated with.
started_atstringA time value given in ISO8601 combined date and time format that represents when the action was initiated.
statusstringThe current status of the action. This can be "in-progress", "completed", or "errored".
typestringThis 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

NameAccessible byRequired ParamsDescription
imageActions_getSELECTaction_id, image_idTo retrieve the status of an image action, send a GET request to /v2/images/$IMAGE_ID/actions/$IMAGE_ACTION_ID.
imageActions_listSELECTimage_idTo retrieve all actions that have been executed on an image, send a GET request to /v2/images/$IMAGE_ID/actions.
imageActions_postINSERTimage_idThe 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.
_imageActions_getEXECaction_id, image_idTo retrieve the status of an image action, send a GET request to /v2/images/$IMAGE_ID/actions/$IMAGE_ACTION_ID.
_imageActions_listEXECimage_idTo retrieve all actions that have been executed on an image, send a GET request to /v2/images/$IMAGE_ID/actions.