Modifies an access control list (ACL) rule.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
smartag:ModifyACLRule | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where the ACL is deployed. | cn-shanghai |
AclId | string | Yes | The ID of the ACL. | acl-xhwhyuo43l0n******* |
AcrId | string | Yes | The ID of the ACL rule. You can call the DescribeACLAttribute operation to query the ID of the ACL rule that is added to the ACL. | acr-u98qztgtgvhb******** |
Description | string | No | The description of the ACL rule. The description must be 1 to 512 characters in length. | test |
Direction | string | No | The direction of traffic in which the ACL rule is applied. Valid values:
| in |
SourceCidr | string | No | The source CIDR block. Specify the value of this parameter in CIDR notation. Example: 192.168.1.0/24. | 0.0.0.0/0 |
DestCidr | string | No | The destination CIDR block. Specify the value of this parameter in CIDR notation. Example: 192.168.10.0/24. | 0.0.0.0/0 |
IpProtocol | string | No | The protocol used by the ACL rule. The supported protocols provided in this topic are for reference only. The actual protocols in the SAG console shall prevail. The value of the parameter is not case-sensitive. | tcp |
SourcePortRange | string | No | The source port range. Valid values: 1 to 65535 and -1. Examples:
| 80/80 |
DestPortRange | string | No | The destination port range. Valid values: 1 to 65535 and -1. Examples:
| 80/80 |
Policy | string | No | The action of the ACL rule. Valid values:
| accept |
Priority | integer | No | The priority of the ACL rule. A smaller value indicates a higher priority. If multiple rules have the same priority, the rule that is applied earlier takes effect. Valid values: 1 to 100. Default value: 1. | 2 |
Type | string | No | The type of the ACL rule: Valid values:
| LAN |
Name | string | No | The name of the ACL rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. | doctest |
DpiSignatureIds | array | No | ||
string | No | The IDs of applications that match the ACL rule. You can call the ListDpiSignatures operation to query application IDs and information about the applications. | 1 | |
DpiGroupIds | array | No | ||
string | No | The IDs of application groups that match the ACL rule. You can call the ListDpiGroups operation to query application group IDs and information about the applications. | 20 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Policy": "accept",
"Description": "test",
"RequestId": "7F3DD2C1-0F6B-4575-9106-B2D50DF7A711",
"SourcePortRange": "-1/-1",
"SourceCidr": "0.0.0.0/0",
"Priority": 1,
"AclId": "acl-jdc7tir4fkplwr****",
"AcrId": "acr-r8hezn2pi39s5a****",
"DestPortRange": "-1/-1",
"Direction": "in",
"DpiGroupIds": {
"DpiGroupId": [
"20"
]
},
"Name": "doctest",
"GmtCreate": 1553777700000,
"DestCidr": "0.0.0.0/0",
"DpiSignatureIds": {
"DpiSignatureId": [
"1"
]
},
"IpProtocol": "ALL"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ACL.NoSupportWanType | An SAG 1000 device does not support a WAN ACL. | An SAG 1000 device does not support a WAN ACL. |
400 | ACL.InvalidType | The specified ACL type is invalid. | The specified ACL type is invalid. |
403 | Forbidden | User not authorized to operate on the specified resource. | You do not have permissions to manage the specified resource. |
403 | MissingParameter | The input parameter is missing, please check your input. | Missing parameters. Check whether all required parameters are set. |
403 | InvalidDescription | Description not valid. | The length of the description has exceeded the upper limit. |
403 | InvalidParameter | The specified parameter is invalid. | Invalid parameters. |
403 | FeatureNotSupport | The current edition of the smart access gateway does not support this feature. | The current version of Smart Access Gateway does not support this feature. |
403 | FeatureNotSupportForActiveSmartAG | The current edition of the active smart access gateway does not support this feature. | The current edition of the active SAG instance does not support this feature. |
403 | FeatureNotSupportForStandBySmartAG | The current edition of the standby smart access gateway does not support this feature. | The current version of Smart Access Gateway does not support this feature. |
403 | NotSupportedProtocol | The specified protocol of the ACL rule is not supported. | The specified protocol of the ACL rule is not supported. |
403 | InvalidId.ACL | The specified ACL ID is invalid. | The specified ACL group ID is invalid. |
403 | InvalidId.ACR | The specified ACL rule ID is invalid. | The specified ACL rule ID is invalid. |
403 | InvalidPortRange | The specified port range is invalid. | The specified port range is invalid. |
403 | InternalError | An internal server error occurred. | An internal server error occurred. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|