quotas
Creates, updates, deletes, gets or lists a quotas resource.
Overview​
| Name | quotas |
| Type | Resource |
| Id | ovh.public_cloud.quotas |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Project ID this quota belongs to |
checksum | string | Computed hash representing the current target specification value |
created_at | string (date-time) | Creation date of the quota (wire: createdAt) |
current_state | object | Current state of the quota (wire: currentState) |
current_tasks | array | Ongoing asynchronous tasks related to the quota (wire: currentTasks) |
resource_status | string | Quota readiness in the system (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Last target specification of the quota (wire: targetSpec) |
updated_at | string (date-time) | Last update date of the quota (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project_id | region | 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. |
update | update | project_id, target_spec | 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. |
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 |
|---|---|---|
api_host | string | The 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_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
region | string | Optional region filter |
SELECT examples​
- get
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​
- update
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;