• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V3 Interfaces
  5. Volumes
  6. Update Volume Metadata

Update Volume Metadata

Function Description

This interface is used to update the volume metadata.

Interface Format

Method

URI

Description

PUT

/v3/{project_id}/volumes/{volume_id}/metadata

Updates the volume metadata.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Remarks

metadata

Dict

Yes

Specifies the volume metadata. Ensure that key and value in the metadata contain fewer than 255 characters.

Response Parameter

Parameter

Type

Mandatory

Remarks

metadata

Dict

Yes

Adds metadata of a volume.

Request Example

PUT https://volume.localdomain.com:8776/v3/5f13ecc9281d4c34bd740f277620bdee/volumes/d23a846b-0c0c-427a-a490-84331c33c52f/metadata
{
"metadata": {
           "testkey1": "testvalue1", 
           "testkey2": "testvalue2"
          }
}

Response Example

{
"metadata": {
           "testkey1": "testvalue1", 
           "testkey2": "testvalue2",
           }
}

Error Code

See section Processing Return Code.