{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To create a new volume, send a POST request to `/v2/volumes`. Optionally, a `filesystem_type` attribute may be provided in order to automatically format the volume's filesystem. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to Droplets without support for auto-mounting is not recommended.","properties":{"body":{"anyOf":[{"$ref":"#/definitions/volumes_ext4"},{"$ref":"#/definitions/volumes_xfs"}],"examples":[{"size_gigabytes":10,"name":"ext4-example","description":"Block store for examples","region":"nyc1","filesystem_type":"ext4","filesystem_label":"ext4_volume_01"}]}},"required":["body"],"additionalProperties":false,"definitions":{"volumes_ext4":{"type":"object","allOf":[{"$ref":"#/definitions/volume_base"},{"$ref":"#/definitions/volume_snapshot_id"},{"$ref":"#/definitions/volume_write_file_system_type"},{"properties":{"region":{"$ref":"#/definitions/region_slug"},"filesystem_label":{"allOf":[{"$ref":"#/definitions/volume_write_file_system_label"},{"maxLength":16}]}},"required":["name","size_gigabytes","region"]}]},"volumes_xfs":{"type":"object","allOf":[{"$ref":"#/definitions/volume_base"},{"$ref":"#/definitions/volume_snapshot_id"},{"$ref":"#/definitions/volume_write_file_system_type"},{"properties":{"region":{"$ref":"#/definitions/region_slug"},"filesystem_label":{"allOf":[{"$ref":"#/definitions/volume_write_file_system_label"},{"maxLength":12}]}},"required":["name","size_gigabytes","region"]}]},"volume_base":{"type":"object","properties":{"name":{"type":"string","description":"A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and \"-\", up to a limit of 64 characters. The name must begin with a letter.","examples":["example"]},"description":{"type":"string","description":"An optional free-form text field to describe a block storage volume.","examples":["Block store for examples"]},"size_gigabytes":{"type":"integer","description":"The size of the block storage volume in GiB (1024^3). This field does not apply  when creating a volume from a snapshot.","examples":[10]},"tags":{"$ref":"#/definitions/tags_array"}}},"volume_snapshot_id":{"properties":{"snapshot_id":{"type":"string","description":"The unique identifier for the volume snapshot from which to create the volume.","examples":["b0798135-fb76-11eb-946a-0a58ac146f33"]}}},"volume_write_file_system_type":{"type":"object","properties":{"filesystem_type":{"type":"string","description":"The name of the filesystem type to be used on the volume. When provided, the volume will automatically be formatted to the specified filesystem type. Currently, the available options are `ext4` and `xfs`. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to other Droplets is not recommended.","examples":["ext4"]}}},"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"]},"volume_write_file_system_label":{"type":"string","description":"The label applied to the filesystem. Labels for ext4 type filesystems may contain 16 characters while labels for xfs type filesystems are limited to 12 characters. May only be used in conjunction with filesystem_type.","examples":["example"]},"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"]]}}},"name":"Create a New Block Storage Volume","id":"digitalocean.volumes_create","example":{"body":{"size_gigabytes":10,"name":"ext4-example","description":"Block store for examples","region":"nyc1","filesystem_type":"ext4","filesystem_label":"ext4_volume_01"}},"maxRequests":1,"summary":false}}