Creates a permission rule for a permission group.
Operation description
A maximum of 300 rules can be added to a permission group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:CreateAccessRule |
create |
*AccessGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AccessGroupName |
string |
Yes |
The name of the permission group. |
vpc-test |
| SourceCidrIp |
string |
No |
The IP address or CIDR block of the authorized address. The value must be a single IP address or a CIDR block. Note
Permission groups of the classic network type support only IP addresses. |
192.0.2.0/16 |
| RWAccessType |
string |
No |
The read and write permissions of the authorized address on the file system. Valid values:
Valid values:
|
RDWR |
| UserAccessType |
string |
No |
The access permissions of the system user of the authorized address on the file system. Valid values:
The nobody user is a default user in Linux. The nobody user can access only public content on the server and has low privileges and high security. Authorization is required for the system user to access the file system. Valid values:
|
no_squash |
| Priority |
integer |
No |
The priority of the permission rule. If an authorized address matches multiple rules, the rule with the highest priority takes effect. Valid values: 1 to 100. The value 1 indicates the highest priority. |
1 |
| FileSystemType |
string |
No |
The type of the file system. Valid values:
Valid values:
|
standard |
| Ipv6SourceCidrIp |
string |
No |
The source IPv6 CIDR block. The value supports CIDR format and IPv6 format address range. Note
|
2001:250:6000::*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
A323836B-5BC6-45A6-8048-60675C23**** |
| AccessRuleId |
string |
The ID of the permission rule. |
1 |
Examples
Success response
JSON format
{
"RequestId": "A323836B-5BC6-45A6-8048-60675C23****",
"AccessRuleId": "1"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParam.Ipv6SourceCidrIp | IPv6 address verification failed. | IPv6 address verification failed. |
| 400 | InvalidParam.SourceCidrIp | IPv4 address verification failed. | IPv4 address verification failed. |
| 400 | InvalidParam.IPv4AndIPv6MutuallyExclusive | You cannot configure IPv4 and IPv6 at the same time. | You cannot configure IPv4 and IPv6 at the same time. |
| 400 | InvalidAccessGroup.NotsupportedIPv6 | The access group does not support IPv6. | The access group does not support IPv6. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.