quota_rules
Creates, updates, deletes, gets or lists a quota_rules resource.
Overview
| Name | quota_rules |
| Type | Resource |
| Id | google.netapp.quota_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the quota rule. Format: projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}. |
createTime | string (google-datetime) | Output only. Create time of the quota rule |
description | string | Optional. Description of the quota rule |
diskLimitMib | integer (int32) | Required. The maximum allowed disk space in MiB. |
labels | object | Optional. Labels of the quota rule |
state | string | Output only. State of the quota rule (STATE_UNSPECIFIED, CREATING, UPDATING, DELETING, READY, ERROR) |
stateDetails | string | Output only. State details of the quota rule |
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 | string | Required. The type of quota rule. (TYPE_UNSPECIFIED, INDIVIDUAL_USER_QUOTA, INDIVIDUAL_GROUP_QUOTA, DEFAULT_USER_QUOTA, DEFAULT_GROUP_QUOTA) |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, volumesId, quotaRulesId | Returns details of the specified quota rule. | |
list | select | projectsId, locationsId, volumesId | filter, pageToken, pageSize, orderBy | Returns list of all quota rules in a location. |
create | insert | projectsId, locationsId, volumesId | quotaRuleId | Creates a new quota rule. |
patch | update | projectsId, locationsId, volumesId, quotaRulesId | updateMask | Updates a quota rule. |
delete | delete | projectsId, locationsId, volumesId, quotaRulesId | Deletes a quota rule. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
locationsId | string | |
projectsId | string | |
quotaRulesId | string | |
volumesId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
quotaRuleId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Returns details of the specified quota rule.
SELECT
name,
createTime,
description,
diskLimitMib,
labels,
state,
stateDetails,
target,
type
FROM google.netapp.quota_rules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND volumesId = '{{ volumesId }}' -- required
AND quotaRulesId = '{{ quotaRulesId }}' -- required
;
Returns list of all quota rules in a location.
SELECT
*
FROM google.netapp.quota_rules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND volumesId = '{{ volumesId }}' -- required
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- create
- Manifest
Creates a new quota rule.
INSERT INTO google.netapp.quota_rules (
data__labels,
data__name,
data__target,
data__description,
data__type,
data__diskLimitMib,
projectsId,
locationsId,
volumesId,
quotaRuleId
)
SELECT
'{{ labels }}',
'{{ name }}',
'{{ target }}',
'{{ description }}',
'{{ type }}',
{{ diskLimitMib }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ volumesId }}',
'{{ quotaRuleId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: quota_rules
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the quota_rules resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the quota_rules resource.
- name: volumesId
value: "{{ volumesId }}"
description: Required parameter for the quota_rules resource.
- name: labels
value: "{{ labels }}"
description: |
Optional. Labels of the quota rule
- name: name
value: "{{ name }}"
description: |
Identifier. The resource name of the quota rule. Format: `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`.
- name: target
value: "{{ target }}"
description: |
Optional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default.
- name: description
value: "{{ description }}"
description: |
Optional. Description of the quota rule
- name: type
value: "{{ type }}"
description: |
Required. The type of quota rule.
valid_values: ['TYPE_UNSPECIFIED', 'INDIVIDUAL_USER_QUOTA', 'INDIVIDUAL_GROUP_QUOTA', 'DEFAULT_USER_QUOTA', 'DEFAULT_GROUP_QUOTA']
- name: diskLimitMib
value: {{ diskLimitMib }}
description: |
Required. The maximum allowed disk space in MiB.
- name: quotaRuleId
value: "{{ quotaRuleId }}"
UPDATE examples
- patch
Updates a quota rule.
UPDATE google.netapp.quota_rules
SET
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__target = '{{ target }}',
data__description = '{{ description }}',
data__type = '{{ type }}',
data__diskLimitMib = {{ diskLimitMib }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND quotaRulesId = '{{ quotaRulesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a quota rule.
DELETE FROM google.netapp.quota_rules
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND quotaRulesId = '{{ quotaRulesId }}' --required
;