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 | Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
acl_rule_id | Yes | String | 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). |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to Obtaining an Enterprise Project ID. If the enterprise project function is not enabled, the value is 0. |
fw_instance_id | No | String | Firewall ID, which can be obtained by referring to Obtaining a Firewall ID. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | User token. You can obtain the token by referring to Obtaining a User Token. |
Content-Type | Yes | String | Content type. It can only be set to application/json. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
dest_rule_id | No | String | ID of the target rule. The added rule is 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). |
top | No | Integer | Whether to pin on top: 0 (no), 1 (yes). |
bottom | No | Integer | Whether to pin to bottom: 0 (no), 1 (yes). |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
data | OrderRuleId object | Rule ID. |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_code | String | Error code. |
error_msg | String | Error description. |
Example Requests
In the project 9d80d070b6d44942af73c9c3d38e0429, 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
Rule sorting response.
{
"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 | Rule sorting response. |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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
