Update a Storage Volume

put

/storage/volume/{name}

Updates a storage volume.

Although you have to pass values for several parameters, you can only increase the size of the storage volume and modify the values for the tags and description parameters. You can update an existing storage volume to increase the capacity dynamically, even when the volume is attached to an instance. You must specify all the required fields, although these fields won't be updated.

Required Role: To complete this task, you must have the Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Path Parameters
  • The three-part name of the object (/Compute-identity_domain/user/object).
Header Parameters
Body ()
The request body contains details of the storage volume that you want to update.
Root Schema : StorageVolume-put-request
Type: object
The request body contains details of the storage volume that you want to update.
Show Source
  • The description of the storage volume.

  • The three-part name of the object (/Compute-identity_domain/user/object).
  • properties

    The storage-pool property.

    For storage volumes that require low latency and high IOPS, such as for storing database files, specify /oracle/public/storage/latency.

    For all other storage volumes, specify /oracle/public/storage/default.

  • The size of this storage volume. Use one of the following abbreviations for the unit of measurement:

    • B or b for bytes
    • K or k for kilobytes
    • M or m for megabytes
    • G or g for gigabytes
    • T or t for terabytes

    For example, to create a volume of size 10 gigabytes, you can specify 10G, or 10240M, or 10485760K, and so on.

    The allowed range is from 1 GB to 2 TB, in increments of 1 GB.

  • tags

    Strings that you can use to tag the storage volume.

Nested Schema : properties
Type: array

The storage-pool property.

For storage volumes that require low latency and high IOPS, such as for storing database files, specify /oracle/public/storage/latency.

For all other storage volumes, specify /oracle/public/storage/default.

Show Source
Nested Schema : tags
Type: array

Strings that you can use to tag the storage volume.

Show Source

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : StorageVolume-response
Type: object
Show Source
Nested Schema : properties
Type: array
The storage-pool property: /oracle/public/storage/latency or /oracle/public/storage/default.
Show Source
Nested Schema : tags
Type: array
Comma-separated strings that tag the storage volume.
Show Source

Examples

cURL Command

The following example shows how to update a storage volume, /Compute-acme/jack.jones@example.com/vol1, by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X PUT
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
     -d "@requestbody.json"
        https://api-z999.compute.us0.oraclecloud.com/storage/volume/jack.jones@example.com/vol1
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

  • acme and jack.jones@example.com are example values. Replace acme with the identity domain ID of your Compute Classic account, and jack.jones@example.com with your user name.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file to update the description, tags, and increase the size of storage volume.

{
  "size": "10G",
  "properties": ["/oracle/public/storage/default"],
  "name": "/Compute-acme/jack.jones@example.com/vol1",
  "tags": ["Accounting Department Block Storage"],
  "description": "Updated Storage Volume"
}

Example of Response Body

The following example shows the response body in JSON format when you update a storage volume.

{
 "status": "Online",
 "account": "/Compute-acme/default",
 "writecache": false,
 "managed": true,
 "description": "Updated Storage Volume",
 "tags": ["Accounting Department Block Storage"],
 "bootable": false,
 "hypervisor": null,
 "quota": null,
 "uri": "https://api-z999.compute.us0.oraclecloud.com/storage/volume/Compute-acme/jack.jones@example.com/vol1",
 "status_detail": "The storage volume is online.",
 "imagelist_entry": -1,
 "storage_pool": "/Compute-acme/jack.jones@example.com/mypool",
 "machineimage_name": null,
 "status_timestamp": "2015-06-01T11:16:04Z",
 "shared": false,
 "imagelist": null,
 "size": "10737418240",
 "properties": ["/oracle/public/storage/default"],
 "name": "/Compute-acme/jack.jones@example.com/vol1"
}