{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To initiate an action on a block storage volume by Id, send a POST request to\n`~/v2/volumes/$VOLUME_ID/actions`. The body should contain the appropriate\nattributes for the respective action.\n\n## Attach a Block Storage Volume to a Droplet\n\n| Attribute  | Details                                                             |\n| ---------- | ------------------------------------------------------------------- |\n| type       | This must be `attach`                                               |\n| droplet_id | Set to the Droplet's ID                                             |\n| region     | Set to the slug representing the region where the volume is located |\n\nEach volume may only be attached to a single Droplet. However, up to fifteen\nvolumes may be attached to a Droplet at a time. Pre-formatted volumes will be\nautomatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS\nDroplets created on or after April 26, 2018 when attached. On older Droplets,\n[additional configuration](https://docs.digitalocean.com/products/volumes/how-to/mount/)\nis required.\n\n## Remove a Block Storage Volume from a Droplet\n\n| Attribute  | Details                                                             |\n| ---------- | ------------------------------------------------------------------- |\n| type       | This must be `detach`                                               |\n| droplet_id | Set to the Droplet's ID                                             |\n| region     | Set to the slug representing the region where the volume is located |\n\n## Resize a Volume\n\n| Attribute      | Details                                                             |\n| -------------- | ------------------------------------------------------------------- |\n| type           | This must be `resize`                                               |\n| size_gigabytes | The new size of the block storage volume in GiB (1024^3)            |\n| region         | Set to the slug representing the region where the volume is located |\n\nVolumes may only be resized upwards. The maximum size for a volume is 16TiB.\n","properties":{"path":{"type":"object","properties":{"volume_id":{"type":"string","format":"uuid","examples":["7724db7c-e098-11e5-b522-000f53304e51"],"description":"The ID of the block storage volume."}},"required":["volume_id"],"additionalProperties":false},"query":{"type":"object","properties":{"per_page":{"type":"integer","minimum":1,"default":20,"maximum":200,"examples":[2],"description":"Number of items returned per page"},"page":{"type":"integer","minimum":1,"default":1,"examples":[1],"description":"Which 'page' of paginated results to return."}},"required":[],"additionalProperties":false},"body":{"anyOf":[{"$ref":"#/definitions/volume_action_post_attach"},{"$ref":"#/definitions/volume_action_post_detach"},{"$ref":"#/definitions/volume_action_post_resize"}],"examples":[{"type":"attach","droplet_id":11612190,"region":"nyc1","tags":["aninterestingtag"]}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"volume_action_post_attach":{"type":"object","allOf":[{"$ref":"#/definitions/volume_action_post_base"},{"properties":{"droplet_id":{"$ref":"#/definitions/volume_action_droplet_id"},"tags":{"$ref":"#/definitions/tags_array"}},"required":["droplet_id"]}]},"volume_action_post_detach":{"type":"object","allOf":[{"$ref":"#/definitions/volume_action_post_base"},{"properties":{"droplet_id":{"$ref":"#/definitions/volume_action_droplet_id"}},"required":["droplet_id"]}]},"volume_action_post_resize":{"type":"object","allOf":[{"$ref":"#/definitions/volume_action_post_base"},{"properties":{"size_gigabytes":{"type":"integer","description":"The new size of the block storage volume in GiB (1024^3).","maximum":16384}},"required":["size_gigabytes"]}]},"volume_action_post_base":{"type":"object","properties":{"type":{"type":"string","description":"The volume action to initiate.","enum":["attach","detach","resize"],"examples":["attach"]},"region":{"$ref":"#/definitions/region_slug"}},"required":["type"]},"volume_action_droplet_id":{"type":"integer","description":"The unique identifier for the Droplet the volume will be attached or detached from.","examples":[11612190]},"tags_array":{"type":["array","null"],"items":{"type":"string"},"description":"A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags. <br><br>Requires `tag:create` scope.","examples":[["base-image","prod"]]},"region_slug":{"type":"string","description":"The slug identifier for the region where the resource will initially be  available.","enum":["ams1","ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1","syd1"],"examples":["nyc3"]}}},"name":"Initiate A Block Storage Action By Volume Id","id":"digitalocean.volumeactions_post_byid","example":{"path":{"volume_id":"7724db7c-e098-11e5-b522-000f53304e51"},"body":{"type":"attach","droplet_id":11612190,"region":"nyc1","tags":["aninterestingtag"]}},"maxRequests":1,"summary":false}}