diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index ed57a7c2caf..e722390a2ee 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -101,6 +101,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. @@ -1122,6 +1129,12 @@ message_level: in: body required: true type: string +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/v3/samples/volume-metadata-show-key-response.json b/api-ref/source/v3/samples/volume-metadata-show-key-response.json new file mode 100644 index 00000000000..ebd589c1b2d --- /dev/null +++ b/api-ref/source/v3/samples/volume-metadata-show-key-response.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "test" + } +} diff --git a/api-ref/source/v3/samples/volume-metadata-update-key-request.json b/api-ref/source/v3/samples/volume-metadata-update-key-request.json new file mode 100644 index 00000000000..023712fce45 --- /dev/null +++ b/api-ref/source/v3/samples/volume-metadata-update-key-request.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "new_name" + } +} diff --git a/api-ref/source/v3/samples/volume-metadata-update-key-response.json b/api-ref/source/v3/samples/volume-metadata-update-key-response.json new file mode 100644 index 00000000000..023712fce45 --- /dev/null +++ b/api-ref/source/v3/samples/volume-metadata-update-key-response.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "new_name" + } +} diff --git a/api-ref/source/v3/volumes-v3-volumes.inc b/api-ref/source/v3/volumes-v3-volumes.inc index cbb22ecff1d..ea8ee75fe1d 100644 --- a/api-ref/source/v3/volumes-v3-volumes.inc +++ b/api-ref/source/v3/volumes-v3-volumes.inc @@ -623,14 +623,14 @@ Response Parameters .. rest_parameters:: parameters.yaml - - metadata: metadata_3 + - meta: meta Response Example ---------------- -.. literalinclude:: ./samples/volume-metadata-show-response.json +.. literalinclude:: ./samples/volume-metadata-show-key-response.json :language: javascript @@ -655,6 +655,45 @@ Request - key: key_1 +Update a volume's metadata for a specific key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: PUT /v3/{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 + Get volumes summary ~~~~~~~~~~~~~~~~~~~