This API is used to add or update tags for an EVS resource.
This API has been deprecated. Use another API. For details, see Batch Adding Tags for the Specified EVS Disk.
POST /v2/{project_id}/os-vendor-tags/{resource_type}/{resource_id}
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. |
resource_type |
Yes |
Specifies the resource type. The value can be volumes, snapshots, or backups. |
resource_id |
Yes |
Specifies the resource ID. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
tags |
Object |
Yes |
Specifies the key-value pair of the tag. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
Content-Type |
Object |
Yes |
Specifies the type. The value can be application/json. |
{ "tags" : { "key_0" : "value_0", "key_1" : "value_1" } }
If the request body contains an existing key of the resource, the original tag containing this key will be overwritten. For example, "key_1":"val_1" is an existing tag of the resource. If the request body contains "key_1":"val_11", the tag of key_1 for this resource is "key_1":"val_11".
Parameter |
Type |
Description |
---|---|---|
tags |
Object |
Specifies the key-value pair of the tag. |
{ "tags" : { "key_0" : "value_0", "key_1" : "value_1" } }
or
{ "error": { "message": "XXXX", "code": "XXX" } }
In the preceding example, error indicates a general error, for example, badRequest or itemNotFound. An example is provided as follows:
{ "badRequest": { "message": "Invalid tags: Tags property value contains invalid characters.", "code": 400 } }
For details, see Error Codes.