Updated on 2026-09-10 GMT+08:00

Binding a Protected Object to a Policy

Function

Binding a protected object to a policy

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/policies/{policy_id}/bind

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

package_id

Yes

String

Instance ID.

id_list

Yes

Array of strings

ID list of protected IP addresses.

Response Parameters

Status code: 200

None

Example Requests

Assign a specific protection policy to the instance with ID 634f346e-a291-4124-a6be-ac57e6152463 and bind the IP address with protection ID 634f346e-a291-4124-a6be-ac57e6152464 to the instance.

POST https://{endpoint}/v1/cnad/policies/{policy_id}/bind

{
  "package_id" : "634f346e-a291-4124-a6be-ac57e6152463",
  "id_list" : [ "634f346e-a291-4124-a6be-ac57e6152464" ]
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.