Adds a new directory quota rule to a Polarlakebase instance.
Operation description
Request description
This operation adds a new path policy—a directory quota rule—to a specified Polarlakebase instance.
The
Quotasparameter is a list. Each element represents a new quota rule. You can add up to 11 rules in a single request.Each rule must include the
NameandIncludefields. Other fields, such asDescriptionandExclude, are optional.To define the quota limit, specify at least one of the following parameters:
SizeLimit,FileCountLimit,AccessTTL, orChangeTTL.The
Priorityfield specifies the rule priority. A larger value indicates higher priority. The default value is 0.The
Enabledfield determines 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 Polarlakebase 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 for a user in the directory. |
222 |
| AccessTTL |
integer |
No |
The time to live (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 |
Specifies whether to enable the rule. 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 |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
7F2007D3-7E74-4ECB-89A8-BF130D****** |
| PolarFsInstanceId |
string |
The ID of the Polarlakebase 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.