CreateAccessRule is used to create a permission rule.

Request parameters

Parameter name Type  Required Description
Action String TRUE Operation interface name and system required parameter. Value: CreateAccessRule
AccessGroupName String TRUE Permission group name
SourceCidrIp String TRUE Address or address segment
RWAccessType String FALSE Read-write permission type: RDWR (default), RDONLY
UserAccessType String FALSE User permission type: no_squash (default), root_squash, all_squash
Priority Integer FALSE Priority level. Range: 1-100. Default value: 1

Response parameters

Parameter name  Type Description
AccessRuleId String Rule serial number

Example

  • Request example

    GET https://nas.cn-hangzhou.aliyuncs.com/?Action=CreatAccessRule
    &AccessGroupName=classic-test
    &SourceCidrIp=10.0.0.1/32
    &<Public Request Parameter>
    …
    
  • Response example
    • XML example

      <? xml version="1.0" encoding="UTF-8"? >
      <CreateAccessRuleResponse>
        <AccessRuleId>1</AccessRuleId>
        <RequestId>A323836B-5BC6-45A6-8048-60675C23EE2A</RequestId>
      </CreateAccessRuleResponse>
      
    • JSON example

      {
        "RequestId": "A323836B-5BC6-45A6-8048-60675C23EE2A",
        "AccessRuleId": "1"
      }