Skip to main content

quota_rules

Creates, updates, deletes, gets or lists a quota_rules resource.

Overview

Namequota_rules
TypeResource
Idgoogle.netapp.quota_rules

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the quota rule. Format: projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}.
createTimestring (google-datetime)Output only. Create time of the quota rule
descriptionstringOptional. Description of the quota rule
diskLimitMibinteger (int32)Required. The maximum allowed disk space in MiB.
labelsobjectOptional. Labels of the quota rule
statestringOutput only. State of the quota rule
stateDetailsstringOutput only. State details of the quota rule
targetstringOptional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default.
typestringRequired. The type of quota rule.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, volumesId, quotaRulesIdReturns details of the specified quota rule.
listselectprojectsId, locationsId, volumesIdpageSize, pageToken, filter, orderByReturns list of all quota rules in a location.
createinsertprojectsId, locationsId, volumesIdquotaRuleIdCreates a new quota rule.
patchupdateprojectsId, locationsId, volumesId, quotaRulesIdupdateMaskUpdates a quota rule.
deletedeleteprojectsId, locationsId, volumesId, quotaRulesIdDeletes 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
quotaRulesIdstring
volumesIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
quotaRuleIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

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;