volume_actions
Overview
Name | volume_actions |
Type | Resource |
Id | digitalocean.block_storage.volume_actions |
Fields
Name | Datatype | Description |
---|---|---|
id | integer | A unique numeric ID that can be used to identify and reference an action. |
action_resource_id | integer | A unique identifier for the resource that the action is associated with. |
action_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. |
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 | |
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 "attach_volume" to represent the state of a volume attach action. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
volumeActions_get | SELECT | action_id, volume_id | To retrieve the status of a volume action, send a GET request to /v2/volumes/$VOLUME_ID/actions/$ACTION_ID . |
volumeActions_list | SELECT | volume_id | To retrieve all actions that have been executed on a volume, send a GET request to /v2/volumes/$VOLUME_ID/actions . |
volumeActions_post | INSERT | To initiate an action on a block storage volume by Name, send a POST request to~/v2/volumes/actions . The body should contain the appropriateattributes for the respective action. ## Attach a Block Storage Volume to a Droplet | Attribute | Details | | ----------- | ------------------------------------------------------------------- | | type | This must be attach || volume_name | The name of the block storage volume | | droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | Each volume may only be attached to a single Droplet. However, up to five volumes may be attached to a Droplet at a time. Pre-formatted volumes will be automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018 when attached. On older Droplets, additional configuration is required. ## Remove a Block Storage Volume from a Droplet | Attribute | Details | | ----------- | ------------------------------------------------------------------- | | type | This must be detach || volume_name | The name of the block storage volume | | droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | | |
_volumeActions_get | EXEC | action_id, volume_id | To retrieve the status of a volume action, send a GET request to /v2/volumes/$VOLUME_ID/actions/$ACTION_ID . |
_volumeActions_list | EXEC | volume_id | To retrieve all actions that have been executed on a volume, send a GET request to /v2/volumes/$VOLUME_ID/actions . |
volumeActions_post_byId | EXEC | volume_id | To initiate an action on a block storage volume by Id, send a POST request to~/v2/volumes/$VOLUME_ID/actions . The body should contain the appropriateattributes for the respective action. ## Attach a Block Storage Volume to a Droplet | Attribute | Details | | ---------- | ------------------------------------------------------------------- | | type | This must be attach || droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | Each volume may only be attached to a single Droplet. However, up to seven volumes may be attached to a Droplet at a time. Pre-formatted volumes will be automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018 when attached. On older Droplets, additional configuration is required. ## Remove a Block Storage Volume from a Droplet | Attribute | Details | | ---------- | ------------------------------------------------------------------- | | type | This must be detach || droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | ## Resize a Volume | Attribute | Details | | -------------- | ------------------------------------------------------------------- | | type | This must be resize || size_gigabytes | The new size of the block storage volume in GiB (1024^3) | | region | Set to the slug representing the region where the volume is located | Volumes may only be resized upwards. The maximum size for a volume is 16TiB. |