Help Center/ Config/ API Reference/ APIs/ Resource Tags/ Batch Deleting Resource Tags
Updated on 2025-12-15 GMT+08:00

Batch Deleting Resource Tags

Function

This API is idempotent and is used to batch delete tags for a specified resource. Each resource can have 20 tags at most.

Note: This api supports only resource type of Config. Currently, resource_type supports config:policyAssignments, config:aggregators, config:aggregationAuthorizations.

Calling Method

For details, see Calling APIs.

URI

POST /v1/resource-manager/{resource_type}/{resource_id}/tags/delete

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

resource_type

Yes

String

Resource type.

resource_id

Yes

String

Resource ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

tags

No

Array of ResourceUnTag objects

Specifies tags. For tenant permissions, this parameter is mandatory. For the op_service permission, choose either this parameter or sys_tags.

Array Length: 1 - 20

Table 3 ResourceUnTag

Parameter

Mandatory

Type

Description

key

Yes

String

Tag key. A tag key can contain up to 128 Unicode characters and must comply with the character set specifications in section 3.1.

Minimum: 1

Maximum: 128

value

Yes

String

Tag value. A tag value can contain up to 255 Unicode characters and must comply with the character set specifications in section 3.2.

Minimum: 0

Maximum: 255

Response Parameters

Status code: 204

No content.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Example Requests

Deleting Tags for Specified Instances in Batches

POST https://{endpoint}/v1/resource-manager/{resource_type}/{resource_id}/tags/delete

{
  "tags" : [ {
    "key" : "key1"
  }, {
    "key" : "key2",
    "value" : "value2"
  } ]
}

Example Responses

None

Status Codes

Status Code

Description

204

No content.

400

Invalid parameter.

401

Unauthorized.

403

Forbidden.

404

Resources not found.

500

Internal server error.

Error Codes

See Error Codes.