Help Center/ Anti-DDoS Service/ API Reference/ CNAD Advanced APIs/ CNAD Advanced - Instance Management/ Updating all Protected Objects Bound to an Instance
Updated on 2026-09-10 GMT+08:00

Updating all Protected Objects Bound to an Instance

Function

Updating all protected objects bound to an instance

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

POST /v1/cnad/packages/{package_id}/protected-ips

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

package_id

Yes

String

Instance 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

protected_ip_list

Yes

Array of UpdateProtectedIpInPolicyBody objects

All protected IP address list.

Table 4 UpdateProtectedIpInPolicyBody

Parameter

Mandatory

Type

Description

id

Yes

String

Protection IP address ID

ip

Yes

String

Protection IP address

type

Yes

String

Type. VPN, NAT, VIP, CCI, EIP, ELB, REROUTING_IP, SubEni, and NetInterFace.

name

No

String

Name

Response Parameters

Status code: 200

None

Example Requests

Changes the full protection object of the specified instance to EIP 1.1.1.1 (ID: 0c613ff9-2b63-4aa2-9333-e03541fe0d9a).

POST https://{endpoint}/v1/cnad/packages/{package_id}/protected-ips

{
  "protected_ip_list" : [ {
    "ip" : "1.1.1.1",
    "id" : "0c613ff9-2b63-4aa2-9333-e03541fe0d9a",
    "type" : "EIP"
  } ]
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.