This API is used to query permission rules of a file system.
A maximum of 64 permission rules can be added for a file system.
This API is only supported for NFS file systems.
GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
The project ID. |
share_id |
Yes |
String |
The file system ID. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
limit |
No |
Long |
The maximum number of permission rules that can be returned. |
offset |
No |
Long |
The offset of the returned permission rules. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
The account token. |
Content-Type |
Yes |
String |
The MIME type. |
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
rules |
Array of OnePermRuleResponseInfo objects |
The permission information. |
Parameter |
Type |
Description |
|---|---|---|
id |
String |
The permission rule ID. |
ip_cidr |
String |
The IP address or IP address range of the authorized object. It cannot be modified after configuration. |
rw_type |
String |
The read/write permission of the authorized object.
|
user_type |
String |
The file system access permission granted to the user of the authorized object. The value can be:
|
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
errCode |
String |
The error code. |
errMsg |
String |
The error message. |
Querying the permission rules of the file system whose ID is 77ba6f4b-6365-4895-8dda-bc7142af4dde
GET HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares/77ba6f4b-6365-4895-8dda-bc7142af4dde/fs/perm-rules
Status code: 200
Successful query
Response example of querying the permission rules of a file system
{
"rules" : [ {
"id" : "1131ed520xxxxxxebedb6e57xxxxxxxx",
"ip_cidr" : "192.168.xx.xx/16",
"rw_type" : "rw",
"user_type" : "no_root_squash"
}, {
"id" : "1231ed520xxxxxxebedb6e57xxxxxxxx",
"ip_cidr" : "192.32.xx.xx/16",
"rw_type" : "rw",
"user_type" : "no_root_squash"
} ]
}
Status code: 500
Error response
{
"errCode" : "SFS.TURBO.0005",
"errMsg" : "Internal server error"
}
Status Code |
Description |
|---|---|
200 |
Successful query |
500 |
Error response |
See Error Codes.