Modifying a Permission Rule

Function

This API is used to modify a permission rule.

URI

PUT /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

share_id

Yes

String

File system ID

rule_id

Yes

String

Permission rule ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Account token

Content-Type

Yes

String

MIME type

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

rw_type

No

String

Read/write permission of the object to be authorized. The value can be rw (read and write permission), ro (read only permission), or none (no access permission). The default value is rw.

user_type

No

String

File system access permission granted to the user of the object to be authorized. The value can be no_root_squash, root_squash, or all_squash. Value no_root_squash allows the root user on the client to access the file system as root. Value root_squash allows the root user on the client to access the file system as nfsnobody. Value all_squash allows any user on the client to access the file system as nfsnobody.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

ip_cidr

String

IP address or IP address range of the authorized object

rw_type

String

Read/write permission of the authorized object. The value can be rw (read and write permission), ro (read only permission), or none (no access permission). The default value is rw.

user_type

String

File system access permission granted to the user of the authorized object. The value can be no_root_squash, root_squash, or all_squash. Value no_root_squash allows the root user on the client to access the file system as root. Value root_squash allows the root user on the client to access the file system as nfsnobody. Value all_squash allows any user on the client to access the file system as nfsnobody.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

errCode

String

Error code

Minimum length: 8 characters

Maximum length: 36 characters

errMsg

String

Error message

Minimum length: 2 characters

Maximum length: 512 characters

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

errCode

String

Error code

Minimum length: 8 characters

Maximum length: 36 characters

errMsg

String

Error message

Minimum length: 2 characters

Maximum length: 512 characters

Example Request

{
  "rw_type" : "rw",
  "user_type" : "no_root_squash"
}

Example Response

{
  "ip_cidr":"188.88.88.88",
  "rw_type":"ro",
  "user_type":"no_root_squash"
}

Status code: 200

Successful modification

Status code: 400

Error response

{
  "errCode" : "SFS.TURBO.0001",
  "errMsg" : "Invalid rule id"
}

Status code: 500

Error response

{
  "errCode" : "SFS.TURBO.0005",
  "errMsg" : "Internal server error"
}

Status Codes

Status Code

Description

200

Successful modification

400

Error response

500

Error response