Skip to main content

CreateAccessRule

Description

call the CreateAccessRule interface to create permission group rules.

Request Method

POST

Request Path

/apsara/route/NAS/CreateAccessRule

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
UserAccessTypeBODYstringNono_squashthe 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.
regionIdBODYstringYesNo sample value for this parameter.region id
PriorityBODYintegerNo1priority 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.
AccessGroupNameBODYstringYesclassic-testpermission group name.
SourceCidrIpBODYstringYes10.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.
FileSystemTypeBODYstringNostandardfile system type. default value: standard (general purpose NAS)
RWAccessTypeBODYstringNoRDWRAuthorize the read and write permissions of the object to the file system. Value: RDWR (default): read and write RDONLY: read-only
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
RequestIdstringA323836B-5BC6-45A6-8048-60675C23****request ID.
AccessRuleIdstring1permission 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
}

}