CreateAccessRule
Description
call the CreateAccessRule interface to create permission group rules.
Request Method
POST
Request Path
/apsara/route/NAS/CreateAccessRule
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
UserAccessType | BODY | string | No | no_squash | the system user of the authorized object has access to the file system. Value: no_squash: allows root user to access the file system. root_squash: when accessing as root, map the nobody user. all_squash: no matter what user is accessed, it is mapped to a nobody user. nobody user is the default user of Linux system and can only access public content on the server, which has the characteristics of low authority and high security. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Priority | BODY | integer | No | 1 | priority of permission group rules. when the same authorization object matches multiple rules, the high priority rule takes effect. value range: 1~100,1 is the highest priority. |
AccessGroupName | BODY | string | Yes | classic-test | permission group name. |
SourceCidrIp | BODY | string | Yes | 10.0.*.*/** | the IP address or network segment of the authorized object. The format must be a single IP address or CIDR network segment. description The permission group of the classic network type only supports IP addresses. |
FileSystemType | BODY | string | No | standard | file system type. default value: standard (general purpose NAS) |
RWAccessType | BODY | string | No | RDWR | Authorize the read and write permissions of the object to the file system. Value: RDWR (default): read and write RDONLY: read-only |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestId | string | A323836B-5BC6-45A6-8048-60675C23**** | request ID. |
AccessRuleId | string | 1 | permission group rule ID. |
Example
Successful Response example
{
"RequestId":"A323836B-5BC6-45A6-8048-60675C23****",
"AccessRuleId":"1"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}