diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index a9a2900539e..4f9b0b602e3 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -71,6 +71,13 @@ key_2: in: path required: true type: string +key_3: + description: | + The metadata key name for the metadata that you + want to update. + in: path + required: true + type: string project_id_path: description: | The UUID of the project in a multi-tenancy cloud. @@ -915,6 +922,12 @@ maxTotalVolumes: in: body required: true type: integer +meta: + description: | + The metadata key and value pair for the volume. + in: body + required: true + type: object metadata: description: | One or more metadata key and value pairs for the diff --git a/api-ref/source/v2/samples/volume-metadata-update-key-request.json b/api-ref/source/v2/samples/volume-metadata-update-key-request.json new file mode 100644 index 00000000000..023712fce45 --- /dev/null +++ b/api-ref/source/v2/samples/volume-metadata-update-key-request.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "new_name" + } +} diff --git a/api-ref/source/v2/samples/volume-metadata-update-key-response.json b/api-ref/source/v2/samples/volume-metadata-update-key-response.json new file mode 100644 index 00000000000..023712fce45 --- /dev/null +++ b/api-ref/source/v2/samples/volume-metadata-update-key-response.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "new_name" + } +} diff --git a/api-ref/source/v2/volumes-v2-volumes.inc b/api-ref/source/v2/volumes-v2-volumes.inc index 2abfba9749d..d5088e7dbd7 100644 --- a/api-ref/source/v2/volumes-v2-volumes.inc +++ b/api-ref/source/v2/volumes-v2-volumes.inc @@ -648,3 +648,45 @@ Request - tenant_id: tenant_id - volume_id: volume_id_path - key: key_1 + + + + +Update volume metadata for a specific key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: PUT /v2/{project_id}/volumes/{volume_id}/metadata/{key} + +Update metadata for a volume for a specific key. + +Normal response codes: 200 + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - project_id: project_id_path + - volume_id: volume_id_path + - key: key_3 + - meta: meta + +Request Example +--------------- + +.. literalinclude:: ./samples/volume-metadata-update-key-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - meta: meta + +Response Example +---------------- + +.. literalinclude:: ./samples/volume-metadata-update-key-response.json + :language: javascript