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
Successful response
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 |
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. |
Successful response
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 |
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. |
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 | pageSize , pageToken , filter , 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
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new quota rule.
INSERT INTO google.netapp.quota_rules (
data__name,
data__target,
data__type,
data__diskLimitMib,
data__description,
data__labels,
projectsId,
locationsId,
volumesId,
quotaRuleId
)
SELECT
'{{ name }}',
'{{ target }}',
'{{ type }}',
{{ diskLimitMib }},
'{{ description }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ volumesId }}',
'{{ quotaRuleId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: quota_rules
props:
- name: projectsId
value: string
description: Required parameter for the quota_rules resource.
- name: locationsId
value: string
description: Required parameter for the quota_rules resource.
- name: volumesId
value: string
description: Required parameter for the quota_rules resource.
- name: name
value: string
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: string
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: type
value: string
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: integer
description: >
Required. The maximum allowed disk space in MiB.
- name: description
value: string
description: >
Optional. Description of the quota rule
- name: labels
value: object
description: >
Optional. Labels of the quota rule
- name: quotaRuleId
value: string
UPDATE
examples
- patch
Updates a quota rule.
UPDATE google.netapp.quota_rules
SET
data__name = '{{ name }}',
data__target = '{{ target }}',
data__type = '{{ type }}',
data__diskLimitMib = {{ diskLimitMib }},
data__description = '{{ description }}',
data__labels = '{{ labels }}'
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;