Modifies a rule in a permission group.

Usage notes

Rules in the default permission groups DEFAULT_VPC_GROUP_NAME and DEFAULT_CLASSIC_GROUP_NAME cannot be modified.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesModifyAccessRule

The operation that you want to perform.

Set the value to ModifyAccessRule.

AccessGroupNameStringYesVPC-test

The name of the permission group.

AccessRuleIdStringYes1

The rule ID.

SourceCidrIpStringYes192.0.**.**

The IP address or CIDR block of the authorized object.

You must set this parameter to an IP address or CIDR block.

Note If the permission group resides in the classic network, you must set this parameter to an IP address.
RWAccessTypeStringNoRDWR

The access permissions of the authorized object on the file system.

Valid values:

  • RDWR (default): the read and write permissions
  • RDONLY: the read-only permissions
UserAccessTypeStringNoall_squash

The access permissions for different types of users in the authorized object.

Valid values:

  • no_squash: allows access from root users to the file system.
  • root_squash: grants root users the least permissions as the nobody user.
  • all_squash: grants all users the least permissions as the nobody user.

The nobody user has the least permissions in Linux and can access only the public content of the file system. This ensures the security of the file system.

PriorityIntegerNo1

The priority of the rule.

Valid values: 1 to 100.

Default value: 1, which indicates the highest priority.

FileSystemTypeStringNostandard

The type of the file system.

Valid values:

  • standard (default): General-purpose NAS file system
  • extreme: Extreme NAS file system
Ipv6SourceCidrIpStringNofe80::3d4a:80fd:f05d:****

The IPv6 address or CIDR block of the authorized object.

You must set this parameter to an IPv6 IP address or CIDR block.

Note
  • Only Extreme NAS file systems that reside in the China (Hohhot) region support IPv6.
  • Only permission groups that reside in virtual private clouds (VPCs) support IPv6.
  • This parameter is unavailable if you specify the SourceCidrIp parameter.

Response parameters

ParameterTypeExampleDescription
RequestIdString6299428C-3861-435D-AE54-9B330A00****

The request ID.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyAccessRule
&AccessGroupName=VPC-test
&AccessRuleId=1
&SourceCidrIp=192.0.**.**
&RWAccessType=RDWR
&UserAccessType=all_squash
&Priority=1
&FileSystemType=standard
&Ipv6SourceCidrIp=fe80::3d4a:80fd:f05d:****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyAccessRuleResponse>
    <RequestId>6299428C-3861-435D-AE54-9B330A00****</RequestId>
</ModifyAccessRuleResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "6299428C-3861-435D-AE54-9B330A00****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParam.Ipv6SourceCidrIpIPv6 address verification failed.The specified IPv6 address fails to be verified.
400InvalidParam.SourceCidrIpIPv4 address verification failed.The specified IPv4 address fails to be verified.
400InvalidParam.IPv4AndIPv6MutuallyExclusiveYou cannot configure IPv4 and IPv6 at the same time.You cannot specify an IPv4 address and an IPv6 address at the same time.
400InvalidAccessGroup.NotsupportedIPv6The access group does not support IPv6.The permission group does not support IPv6.

For a list of error codes, see Service error codes.