Setting the Priority of an ACL Protection Rule
Function
This API is used to set the priority of an ACL protection rule.
URI
PUT /v1/{project_id}/acl-rule/order/{acl_rule_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID, which is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID. Constraints: N/A Range: 32-bit UUID Default Value: N/A |
| acl_rule_id | Yes | String | Definition: Rule ID, which can be obtained by calling the API for querying protection rules. Find the value in data.records.rule_id (The period [.] is used to separate different levels of objects). Constraints: N/A Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Definition: Enterprise project ID. If you plan enterprise projects based on your organization's plan, each enterprise project will have such an ID. After this parameter is configured, you can filter assets by enterprise project. Constraints: N/A Range: N/A Default Value: 0 |
| fw_instance_id | No | String | Definition: Firewall ID. It is a unique ID generated after a firewall instance is created. You can obtain the firewall ID by referring to Obtaining a Firewall ID. Constraints: N/A Range: 32-bit UUID **Default |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition: User token, which carries user identity information. After the token is configured, you can use it for API authentication. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). Constraints: N/A Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| dest_rule_id | No | String | Definition: ID of the target rule. After it is configured, the added rules will be placed after this rule. This parameter cannot be left blank when the added rule is not pinned on top, and can be left blank when the added rule is pinned on top. The rule ID can be obtained by calling the API for querying protection rules. Find the value in data.records.rule_id (The period [.] is used to separate different levels of objects). Constraints: If the added rule is not pinned on top, the rule ID specified here must be valid. Range: N/A Default Value: N/A |
| top | No | Integer | Definition: Whether a rule is pinned on top. Constraints: N/A Range: 0: not pinned; 1: pinned Default Value: N/A |
| bottom | No | Integer | Definition: Whether a rule is pinned at the bottom. Constraints: N/A Range: 0: not pinned; 1: pinned Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| data | OrderRuleId object | Definition: Rule ID. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: ID of the moved rule. Range: N/A |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. Range N/A |
| error_msg | String | Definition Error description. Range N/A |
Example Requests
In the project id9d80d070b6d44942af73c9c3d38e0429, move the rule whose ID is ffe9af47-d893-483b-86e3-ee5242e8cb15 behind the rule whose ID is 69c32dc5-f801-4294-98ee-978b51f97d35.
https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/acl-rule/order/ffe9af47-d893-483b-86e3-ee5242e8cb15
{
"top" : 0,
"dest_rule_id" : "69c32dc5-f801-4294-98ee-978b51f97d35"
} Example Responses
Status code: 200
OK
{
"data" : {
"id" : "ffe9af47-d893-483b-86e3-ee5242e8cb15"
}
} Status code: 400
Bad Request
{
"error_code" : "00200005",
"error_msg" : "Object not found."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized: Request error. |
| 403 | Forbidden: Access forbidden. |
| 404 | Not Found: Web page not found. |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot