Updated on 2022-08-06 GMT+08:00

Adding or Deleting Tags in Batches

Function

This API is used to add or delete tags in batches for a DCS instance.

URI

POST /v2/{project_id}/dcs/{instance_id}/tags/action

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

instance_id

Yes

String

Instance ID.

Request

Table 2 Request body parameter description

Parameter

Mandatory

Type

Description

action

Yes

String

Operation to be performed. The value can be create or delete only.

tags

No

Array of ResourceTag Objects

List of tags.

Table 3 ResourceTag

Parameter

Mandatory

Type

Description

key

Yes

String

Tag key, which:

  • Cannot be left blank.
  • Must be unique.
  • Can contain a maximum of 36 characters.

value

No

String

Tag value, which:

  • Is mandatory when action is set to create and optional when action is set to delete.
  • Can contain a maximum of 43 characters.

Response

None

Example Request

POST https://{dcs_endpoint}/v2/7dddae81f0e34f62adb9618bc8c8b1fe/dcs/01928d55-7020-4500-9c29-774caabe4bc4/tags/action

Example Response

None

Status Code

Status Code

Description

204

Tags added/deleted successfully.

Error Code

See Error Codes.