# REST Resource: projects.locations.volumes.quotaRules

- [Resource: QuotaRule](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#QuotaRule)
  - [JSON representation](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#QuotaRule.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#Type)
- [State](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#State)
- [Methods](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#METHODS_SUMMARY)

## Resource: QuotaRule

QuotaRule specifies the maximum disk space a user or group can use within a volume. They can be used for creating default and individual quota rules.

| JSON representation |
|---|
| ``` { "name": string, "target": string, "type": enum (`https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#Type`), "diskLimitMib": integer, "state": enum (`https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#State`), "stateDetails": string, "createTime": string, "description": string, "labels": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the quota rule. Format: `projects/{projectNumber}/locations/{locationId}/volumes/volumes/{volumeId}/quotaRules/{quotaRuleId}`. |
| `target` | `string` Optional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default. |
| `type` | ``enum (`https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#Type`)`` Required. The type of quota rule. |
| `diskLimitMib` | `integer` Required. The maximum allowed disk space in MiB. |
| `state` | ``enum (`https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules#State`)`` Output only. State of the quota rule |
| `stateDetails` | `string` Output only. State details of the quota rule |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Create time of the quota rule Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `description` | `string` Optional. Description of the quota rule |
| `labels` | `map (key: string, value: string)` Optional. Labels of the quota rule An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## Type

Types of Quota Rule

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Unspecified type for quota rule |
| `INDIVIDUAL_USER_QUOTA` | Individual user quota rule |
| `INDIVIDUAL_GROUP_QUOTA` | Individual group quota rule |
| `DEFAULT_USER_QUOTA` | Default user quota rule |
| `DEFAULT_GROUP_QUOTA` | Default group quota rule |

## State

Quota Rule states

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state for quota rule |
| `CREATING` | Quota rule is creating |
| `UPDATING` | Quota rule is updating |
| `DELETING` | Quota rule is deleting |
| `READY` | Quota rule is ready |
| `ERROR` | Quota rule is in error state. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules/create` | Creates a new quota rule. |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules/delete` | Deletes a quota rule. |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules/get` | Returns details of the specified quota rule. |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules/list` | Returns list of all quota rules in a location. |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1alpha1/projects.locations.volumes.quotaRules/patch` | Updates a quota rule. |