volumes_actions
Creates, updates, deletes, gets or lists a volumes_actions
resource.
Overview
Name | volumes_actions |
Type | Resource |
Id | digitalocean.block_storage.volumes_actions |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | `` |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
volume_actions_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 . |
volume_actions_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 . |
volume_actions_post | EXEC |
| To initiate an action on a block storage volume by Name, send a POST request to ~/v2/volumes/actions . The body should contain the appropriate attributes 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 fifteen 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 | |
volume_actions_post_by_id | 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 appropriate attributes 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 fifteen 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. |
SELECT
examples
To retrieve all actions that have been executed on a volume, send a GET request to /v2/volumes/$VOLUME_ID/actions
.
SELECT
column_anon
FROM digitalocean.block_storage.volumes_actions
WHERE volume_id = '{{ volume_id }}';