Skip to main content

quotas

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

Overview​

Namequotas
TypeResource
Idovh.public_cloud.quotas

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringProject ID this quota belongs to
checksumstringComputed hash representing the current target specification value
created_atstring (date-time)Creation date of the quota (wire: createdAt)
current_stateobjectCurrent state of the quota (wire: currentState)
current_tasksarrayOngoing asynchronous tasks related to the quota (wire: currentTasks)
resource_statusstringQuota readiness in the system (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
target_specobjectLast target specification of the quota (wire: targetSpec)
updated_atstring (date-time)Last update date of the quota (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject_idregionReturns the project quota. When the region query parameter is set, the response narrows targetSpec.regions and currentState.regions to that single region. Omit it to get all regions.
updateupdateproject_id, target_specUpdates the project quota region by region. Each region listed in targetSpec.regions is added or updated, and the regions you omit are left unchanged, so raising the quota of one region does not require restating the others. Unlike the other update routes of this API, this list is merged, not replaced. preventAutomaticQuotaUpgrade is required.

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"}})
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
regionstringOptional region filter

SELECT examples​

Returns the project quota. When the region query parameter is set, the response narrows targetSpec.regions and currentState.regions to that single region. Omit it to get all regions.

SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud.quotas
WHERE project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND region = '{{ region }}'
;

UPDATE examples​

Updates the project quota region by region. Each region listed in targetSpec.regions is added or updated, and the regions you omit are left unchanged, so raising the quota of one region does not require restating the others. Unlike the other update routes of this API, this list is merged, not replaced. preventAutomaticQuotaUpgrade is required.

UPDATE ovh.public_cloud.quotas
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at;