Skip to main content

partition_quotas

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

Overview​

Namepartition_quotas
TypeResource
Idovh.dedicated_nasha.partition_quotas

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
sizeintegerthe size to set in MB
uidintegerthe uid to set quota on

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpartition_name, service_name, uidGet this object properties
listselectpartition_name, service_namex_pagination_modeGet quota for this partition
createinsertpartition_name, service_name, size, uidSet a new quota
deletedeletepartition_name, service_name, uidDelete a given quota

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
partition_namestringthe given name of partition (wire: partitionName)
service_namestringThe internal name of your storage (wire: serviceName)
uidintegerthe uid to set quota on
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get this object properties

SELECT
size,
uid
FROM ovh.dedicated_nasha.partition_quotas
WHERE partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND uid = '{{ uid }}' -- required
;

INSERT examples​

Set a new quota

INSERT INTO ovh.dedicated_nasha.partition_quotas (
size,
uid,
partition_name,
service_name
)
SELECT
{{ size }} /* required */,
{{ uid }} /* required */,
'{{ partition_name }}',
'{{ service_name }}'
RETURNING
task_id,
partition_name,
storage_name,
details,
done_date,
last_update,
operation,
status,
todo_date
;

DELETE examples​

Delete a given quota

DELETE FROM ovh.dedicated_nasha.partition_quotas
WHERE partition_name = '{{ partition_name }}' --required
AND service_name = '{{ service_name }}' --required
AND uid = '{{ uid }}' --required
;