Adds a new directory quota rule to a PolarFileSystem (PolarFS) instance.
Operation description
Request description
-
You can call this operation to add a new path policy, which is a quota rule, to a specified PolarFS instance.
-
The
Quotasparameter is a list. Each element represents a new rule to add. You can add a maximum of 11 rules in a single request. -
Each rule must include the
NameandIncludefields. Other fields, such asDescriptionandExclude, are optional. -
You must provide at least one of the following parameters to define the quota limit:
SizeLimit,FileCountLimit,AccessTTL, orChangeTTL. -
The
Priorityfield sets the rule priority. A larger value indicates a higher priority. The default value is 0. -
The
Enabledfield controls whether the rule takes effect immediately. The default value is true.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:AddPolarFsQuota |
none |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PolarFsInstanceId |
string |
Yes |
The ID of the PolarFS instance. |
pfs-2ze0i74ka607***** |
| Quotas |
array<object> |
Yes |
The details of the quota rules. |
|
|
object |
No |
The details of the quota. |
||
| Name |
string |
Yes |
The name of the rule. |
rule1 |
| Description |
string |
No |
The description of the resource quota. |
quota_policy |
| Include |
string |
Yes |
The wildcard pattern to match paths.
|
/b/*project* |
| Exclude |
string |
No |
The rule to exclude specific paths from matching.
|
/a/*project* |
| SizeLimit |
integer |
No |
The total size limit for files in the directory. Unit: GB.
|
1 |
| FileCountLimit |
integer |
No |
The limit on the number of files a user can have in the directory. |
222 |
| AccessTTL |
integer |
No |
The TTL for the access time. Unit: seconds. |
7200 |
| ChangeTTL |
integer |
No |
The TTL for the change time. Unit: seconds. |
7200 |
| Priority |
integer |
No |
The priority of the quota rule. |
1 |
| Enabled |
boolean |
No |
Indicates whether the rule is enabled. Valid values:
|
True |
| DBClusterId |
string |
No |
The ID of the PolarDB instance on which the application depends. |
pc-************** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
7F2007D3-7E74-4ECB-89A8-BF130D****** |
| PolarFsInstanceId |
string |
The ID of the PolarFS instance. |
pfs-2ze0i74ka607***** |
Examples
Success response
JSON format
{
"RequestId": "7F2007D3-7E74-4ECB-89A8-BF130D******",
"PolarFsInstanceId": "pfs-2ze0i74ka607*****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.