quotas
Creates, updates, deletes, gets or lists a quotas resource.
Overview
| Name | quotas |
| Type | Resource |
| Id | clickhouse.organizations.quotas |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Human-readable name of the quota. (example: Services per organization) |
adjustable | boolean | Whether the limit can be raised for the organization by contacting ClickHouse support. |
description | string | Explanation of the resource the quota limits and how the limit is applied. |
quota_code | string | Stable identifier of the quota. Use it to request a single quota by code. (services-per-organization, postgres-services-per-organization, replicas-per-warehouse, api-keys-per-organization) (example: services-per-organization) (wire: quotaCode) |
scope | string | Granularity at which the limit is applied. For example, replicas-per-warehouse is an organization-wide setting that limits each warehouse individually. (organization, warehouse) (example: organization) |
usage | integer | Current consumption of the quota. Omitted for quotas that do not report usage. Usage can exceed value when a limit was lowered after resources were created; existing resources are not affected. |
value | integer | Limit currently applied to the organization, including any adjustments made for the organization. The value can change when the billing status of the organization changes. |
| Name | Datatype | Description |
|---|---|---|
name | string | Human-readable name of the quota. (example: Services per organization) |
adjustable | boolean | Whether the limit can be raised for the organization by contacting ClickHouse support. |
description | string | Explanation of the resource the quota limits and how the limit is applied. |
quota_code | string | Stable identifier of the quota. Use it to request a single quota by code. (services-per-organization, postgres-services-per-organization, replicas-per-warehouse, api-keys-per-organization) (example: services-per-organization) (wire: quotaCode) |
scope | string | Granularity at which the limit is applied. For example, replicas-per-warehouse is an organization-wide setting that limits each warehouse individually. (organization, warehouse) (example: organization) |
usage | integer | Current consumption of the quota. Omitted for quotas that do not report usage. Usage can exceed value when a limit was lowered after resources were created; existing resources are not affected. |
value | integer | Limit currently applied to the organization, including any adjustments made for the organization. The value can change when the billing status of the organization changes. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | quota_code, organization_id | Disclaimer: This beta endpoint is evolving; the API contract may change. <br /><br /> Returns a single organization quota identified by its quota code. Responds with a not found error when the quota code is unknown or the quota does not apply to the organization. | |
list | select | organization_id | Disclaimer: This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the resource quotas enforced for the organization together with their current usage where available. Quotas that do not apply to the organization are omitted. Quota values reflect the limits currently enforced, so they can be polled to detect changes, for example after a billing status change. The response contains one entry per quota code; quotas enforced per resource may additionally appear under resource-scoped endpoints in the future. |
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 |
|---|---|---|
organization_id | string | ClickHouse Cloud organization ID. Resolved from the CLICKHOUSE_ORG_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every query as WHERE organization_id = <uuid>. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: CLICKHOUSE_ORG_ID) |
quota_code | string | Code of the requested quota. (wire: quotaCode) |
SELECT examples
- get
- list
Disclaimer: This beta endpoint is evolving; the API contract may change. <br /><br /> Returns a single organization quota identified by its quota code. Responds with a not found error when the quota code is unknown or the quota does not apply to the organization.
SELECT
name,
adjustable,
description,
quota_code,
scope,
usage,
value
FROM clickhouse.organizations.quotas
WHERE quota_code = '{{ quota_code }}' -- required
AND organization_id = '{{ organization_id }}' -- required unless CLICKHOUSE_ORG_ID is set
;
Disclaimer: This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the resource quotas enforced for the organization together with their current usage where available. Quotas that do not apply to the organization are omitted. Quota values reflect the limits currently enforced, so they can be polled to detect changes, for example after a billing status change. The response contains one entry per quota code; quotas enforced per resource may additionally appear under resource-scoped endpoints in the future.
SELECT
name,
adjustable,
description,
quota_code,
scope,
usage,
value
FROM clickhouse.organizations.quotas
WHERE organization_id = '{{ organization_id }}' -- required unless CLICKHOUSE_ORG_ID is set
;