• Elastic Volume Service

evs
  1. Help Center
  2. Elastic Volume Service
  3. API Reference
  4. API v2
  5. EVS Tag
  6. Batch Adding Tags for the Specified EVS Disk

Batch Adding Tags for the Specified EVS Disk

Function

This API is used to batch add tags for the specified EVS disk. TMS uses this API to batch manage tags of an EVS disk.

  • When tags are being added and some tags in the request have the same tag keys, an error will be reported.
  • When tags are being added and some tags in the request have the same tag keys as the tags associated with existing disks, the new tags will overwrite the existing tags.
  • A maximum of 10 tags can be created for an EVS disk.

Constraints

None

URI

  • URI format

    POST /v2/{project_id}/os-vendor-volumes/{volume_id}/tags/action

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    volume_id

    Yes

    Specifies the EVS disk ID.

Request

  • Parameter description

    Parameter

    Type

    Mandatory

    Description

    tags

    List<resource_tag>

    Yes

    Specifies the tag list.

    action

    String

    Yes

    Specifies the operation to perform. The value can be create or delete.

    • create: specifies to add tags.
    • delete: specifies to delete tags.
  • Parameters in the tags field

    Parameter

    Type

    Mandatory

    Description

    key

    String

    Yes

    Tag key:
    • Cannot be left blank.
    • Must be unique for each resource.
    • Can contain a maximum of 36 characters.
    • Can contain only digits, letters, hyphens (-), and underscores (_).

    value

    String

    Yes

    Tag value:
    • Can contain a maximum of 43 characters.
    • Can contain only digits, letters, hyphens (-), and underscores (_).
  • Example request
    {
        "action": "create", 
        "tags": [
            {
                "key": "key1", 
                "value": "value1"
            }, 
            {
                "key": "key2", 
                "value": "value3"
            }
        ]
    }

Response

None

Returned Values

  • Normal

    204

Error Codes

For details, see Error Codes.