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

Updating a Policy

Function

Updating a policy

Calling Method

For details, see Calling APIs.

URI

PUT /v1/cnad/policies/{policy_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

policy_id

Yes

String

Policy ID.

Request Parameters

Table 2 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 3 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Policy name.

threshold

No

Integer

Cleaning threshold.

description

No

String

Description

udp

No

String

UDP configuration. The options are block, unblock, and limiting.

tcp

No

String

TCP protocol settings. The options are as follows: block; unblock; limiting

icmp

No

String

ICMP protocol settings. The options are as follows: block; unblock; limiting

other

No

String

Other protocol settings. The options are as follows: block; unblock; limiting

icmp_traffic_limiting

No

Long

Custom ICMP rate limit. If ICMP is set to limiting and this parameter is left blank, the ICMP rate is not limited.

udp_traffic_limiting

No

Long

Custom UDP rate limit. If UDP is set to limiting and this parameter is left blank, the rate is not limited.

udp_fragment_rate_limiting

No

Long

Custom UDP fragment rate limit. If UDP is set to limiting and this parameter is left blank, the rate is not limited.

other_traffic_limiting

No

Long

Custom other rate limit. If other is set to limiting and this parameter is left blank, the rate is not limited.

tcp_traffic_limiting

No

Long

Custom TCP rate limit. If TCP is set to limiting and this parameter is left blank, the rate is not limited.

tcp_fragment_rate_limiting

No

Long

Custom TCP fragment rate limit. If TCP is set to limiting and this parameter is left blank, the rate is not limited.

Response Parameters

Status code: 200

OK

None

Example Requests

Update the name of the specified protection policy to name, set the protocol blocking and rate limiting for UDP, TCP, ICMP, and Other, and set the cleaning threshold to 100 Mbit/s.

PUT https://{endpoint}/v1/cnad/policies/{policy_id}

{
  "name" : "name",
  "udp" : "block",
  "description" : "",
  "threshold" : 100
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.