{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To initiate an action on a block storage volume by Name, send a POST request to\n`~/v2/volumes/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| volume_name | The name of the block storage volume                                |\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| volume_name | The name of the block storage volume                                |\n| droplet_id  | Set to the Droplet's ID                                             |\n| region      | Set to the slug representing the region where the volume is located |\n","properties":{"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"}],"examples":[{"type":"attach","volume_name":"example","droplet_id":11612190,"region":"nyc1","tags":["aninterestingtag"]}]}},"required":["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_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 Name","id":"digitalocean.volumeactions_post","example":{"body":{"type":"attach","volume_name":"example","droplet_id":11612190,"region":"nyc1","tags":["aninterestingtag"]}},"maxRequests":1,"summary":false}}