Updated on 2026-01-06 GMT+08:00

Setting a Tag for a Protected Object

Function

Set a tag for a protected object.

Calling Method

For details, see Calling APIs.

URI

PUT /v1/cnad/protected-ips/tags

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

Yes

String

Content-Type

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Protection IP address ID

tag

Yes

String

Local tag

Response Parameters

Status code: 200

OK

None

Example Requests

Set the tag of the protected IP address whose ID is 79189f77-bc57-46ff-a69d-17168d95c970 to test.

PUT https://{endpoint}/v1/cnad/protected-ips/tags

{
  "id" : "79189f77-bc57-46ff-a69d-17168d95c970",
  "tag" : "test"
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.