Update quota policy rule properties
PATCH /storage/quota/rules/{rule.uuid}
Updates properties of a specific quota policy rule.
Important notes:
-
The quota resize functionality is supported with the PATCH operation.
-
Quota resize allows you to modify the quota limits, directly in the filesystem.
-
The quota must be enabled on a FlexVol or a FlexGroup volume for
quota resize
to take effect. -
If the quota is disabled on the volume, the quota policy rule PATCH API modifies the rule, but this does not affect the limits in the filesystem.
Related ONTAP commands
-
quota policy rule modify
-
quota resize
Learn more
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
rule.uuid |
string |
path |
True |
Rule UUID |
Request Body
Name | Type | Description |
---|---|---|
_links |
||
files |
||
group |
This parameter specifies the target group to which the group quota policy rule applies. This parameter takes a group name or identifier. This parameter is only valid for the POST operation of a group quota policy rule. The POST operation will fail with an appropriate error if this parameter is used as an input to create a user or a tree quota policy rule. This input parameter for POST takes either a group name or a group identifier, but not both. For default quota rules, the group name must be chosen and should be specified as "". For explicit group quota rules, this parameter can contain a UNIX group name or a UNIX group identifier. |
|
qtree |
This parameter specifies the target qtree to which the user/group/tree quota policy rule applies. For a user/group quota policy rule at qtree level, this parameter takes a qtree name and is valid in GET or POST. For a user/group quota policy rule at volume level, this parameter is not valid in GET or POST. For a tree quota policy rule, this parameter is mandatory and is valid in both POST and GET. For a default tree quota policy rule, this parameter needs to be specified as "". For a tree quota policy rule at qtree level, this parameter takes a qtree name and is valid in GET or POST. |
|
space |
||
svm |
SVM, applies only to SVM-scoped objects. |
|
type |
string |
This parameter specifies the quota policy rule type. This is required in POST only and can take either one of the "user", "group" or "tree" values. |
user_mapping |
boolean |
This parameter enables user mapping for user quota policy rules. This is valid in POST or PATCH for user quota policy rules only. |
users |
array[users] |
This parameter specifies the target user to which the user quota policy rule applies. This parameter takes single or multiple user names or identifiers. This parameter is valid only for the POST operation of a user quota policy rule. If this parameter is used as an input to create a group or a tree quota policy rule, the POST operation will fail with an appropriate error. For POST, this input parameter takes either a user name or a user identifier, not both. For default quota rules, the user name must be chosen and specified as "". For explicit user quota rules, this parameter can indicate either a user name or user identifier. The user name can be a UNIX user name or a Windows user name. If a name contains a space, enclose the entire value in quotes. A UNIX user name cannot include a backslash () or an @ sign; user names with these characters are treated as Windows names. The user identifer can be a UNIX user identifier or a Windows security identifier. For multi-user quota, this parameter can contain multiple user targets separated by a comma. |
uuid |
string |
Unique identifier for the quota policy rule. This field is generated when the quota policy rule is created. |
volume |
Example request
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"group": {
"id": "string",
"name": "string"
},
"qtree": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"id": 1,
"name": "qt1"
},
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"type": "string",
"users": [
{
"id": "string",
"name": "string"
}
],
"uuid": "5f1d13a7-f401-11e8-ac1a-005056a7c3b9",
"volume": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
}
}
Response
Status: 202, Accepted
Name | Type | Description |
---|---|---|
job |
Example response
{
"job": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"uuid": "string"
}
}
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
5308545 |
The specified quota rule UUID is invalid. |
5308561 |
Failed to obtain volume quota state or invalid quota state obtained for volume. |
5308546 |
Failed to modify the quota policy rule. |
5308567 |
Quota policy rule modify operation succeeded, but quota resize failed due to internal error. |
5308501 |
Mapping from Windows user to UNIX user for user rule was unsuccessful. |
5308502 |
Mapping from UNIX user to Windows user for user rule was unsuccessful. |
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
files
Name | Type | Description |
---|---|---|
hard_limit |
integer |
This parameter specifies the hard limit for files. This is valid in POST or PATCH. |
soft_limit |
integer |
This parameter specifies the soft limit for files. This is valid in POST or PATCH. |
group
This parameter specifies the target group to which the group quota policy rule applies. This parameter takes a group name or identifier. This parameter is only valid for the POST operation of a group quota policy rule. The POST operation will fail with an appropriate error if this parameter is used as an input to create a user or a tree quota policy rule. This input parameter for POST takes either a group name or a group identifier, but not both. For default quota rules, the group name must be chosen and should be specified as "". For explicit group quota rules, this parameter can contain a UNIX group name or a UNIX group identifier.
Name | Type | Description |
---|---|---|
id |
string |
Quota target group ID |
name |
string |
Quota target group name |
qtree
This parameter specifies the target qtree to which the user/group/tree quota policy rule applies. For a user/group quota policy rule at qtree level, this parameter takes a qtree name and is valid in GET or POST. For a user/group quota policy rule at volume level, this parameter is not valid in GET or POST. For a tree quota policy rule, this parameter is mandatory and is valid in both POST and GET. For a default tree quota policy rule, this parameter needs to be specified as "". For a tree quota policy rule at qtree level, this parameter takes a qtree name and is valid in GET or POST.
Name | Type | Description |
---|---|---|
_links |
||
id |
integer |
The unique identifier for a qtree. |
name |
string |
The name of the qtree. |
space
Name | Type | Description |
---|---|---|
hard_limit |
integer |
This parameter specifies the space hard limit, in bytes. If less than 1024 bytes, the value is rounded up to 1024 bytes. Valid in POST or PATCH. |
soft_limit |
integer |
This parameter specifies the space soft limit, in bytes. If less than 1024 bytes, the value is rounded up to 1024 bytes. Valid in POST or PATCH. |
svm
SVM, applies only to SVM-scoped objects.
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
users
Name | Type | Description |
---|---|---|
id |
string |
Quota target user ID |
name |
string |
Quota target user name |
volume
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the volume. |
uuid |
string |
Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.
|
quota_rule
Name | Type | Description |
---|---|---|
_links |
||
files |
||
group |
This parameter specifies the target group to which the group quota policy rule applies. This parameter takes a group name or identifier. This parameter is only valid for the POST operation of a group quota policy rule. The POST operation will fail with an appropriate error if this parameter is used as an input to create a user or a tree quota policy rule. This input parameter for POST takes either a group name or a group identifier, but not both. For default quota rules, the group name must be chosen and should be specified as "". For explicit group quota rules, this parameter can contain a UNIX group name or a UNIX group identifier. |
|
qtree |
This parameter specifies the target qtree to which the user/group/tree quota policy rule applies. For a user/group quota policy rule at qtree level, this parameter takes a qtree name and is valid in GET or POST. For a user/group quota policy rule at volume level, this parameter is not valid in GET or POST. For a tree quota policy rule, this parameter is mandatory and is valid in both POST and GET. For a default tree quota policy rule, this parameter needs to be specified as "". For a tree quota policy rule at qtree level, this parameter takes a qtree name and is valid in GET or POST. |
|
space |
||
svm |
SVM, applies only to SVM-scoped objects. |
|
type |
string |
This parameter specifies the quota policy rule type. This is required in POST only and can take either one of the "user", "group" or "tree" values. |
user_mapping |
boolean |
This parameter enables user mapping for user quota policy rules. This is valid in POST or PATCH for user quota policy rules only. |
users |
array[users] |
This parameter specifies the target user to which the user quota policy rule applies. This parameter takes single or multiple user names or identifiers. This parameter is valid only for the POST operation of a user quota policy rule. If this parameter is used as an input to create a group or a tree quota policy rule, the POST operation will fail with an appropriate error. For POST, this input parameter takes either a user name or a user identifier, not both. For default quota rules, the user name must be chosen and specified as "". For explicit user quota rules, this parameter can indicate either a user name or user identifier. The user name can be a UNIX user name or a Windows user name. If a name contains a space, enclose the entire value in quotes. A UNIX user name cannot include a backslash () or an @ sign; user names with these characters are treated as Windows names. The user identifer can be a UNIX user identifier or a Windows security identifier. For multi-user quota, this parameter can contain multiple user targets separated by a comma. |
uuid |
string |
Unique identifier for the quota policy rule. This field is generated when the quota policy rule is created. |
volume |
job_link
Name | Type | Description |
---|---|---|
_links |
||
uuid |
string |
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |