ClickHouse/docs/en/operations/system-tables/quotas.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
2.6 KiB
Markdown
Raw Normal View History

2022-08-28 13:53:52 +00:00
---
2022-08-28 13:58:27 +00:00
slug: /en/operations/system-tables/quotas
2022-08-28 13:53:52 +00:00
---
2022-06-02 10:55:18 +00:00
# quotas
Contains information about [quotas](../../operations/system-tables/quotas.md).
DOCS-664: system.quotas (#12472) * DOCSUP-1362[CLICKHOUSEDOCS] [ClickHouse] Describe system tables for RBAC (#127) * Describe system tables for RBAC: quotas, quota_limits, quota_usage, quotas_usage. * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update system-tables.md * Update system-tables.md * Update system-tables.md * Add desc system.quota_limits, system.quotas_usage * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update system-tables.md Сorrect description of max_read_rows. * Update system-tables.md Updated the description of randomized intervals. * Update system-tables.md Updated description of key_type. * Update system-tables.md Updated description of 'roles' * Update system-tables.md Update * Actualized the description. * translation Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru> * CLICKHOUSEDOCS-664: Splitted the description into separated files. Co-authored-by: Sergei Shtykov <bayonet@yandex-team.ru> Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com> Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru>
2020-07-14 06:57:39 +00:00
Columns:
- `name` ([String](../../sql-reference/data-types/string.md)) — Quota name.
- `id` ([UUID](../../sql-reference/data-types/uuid.md)) — Quota ID.
- `storage`([String](../../sql-reference/data-types/string.md)) — Storage of quotas. Possible value: “users.xml” if a quota configured in the users.xml file, “disk” if a quota configured by an SQL-query.
- `keys` ([Array](../../sql-reference/data-types/array.md)([Enum8](../../sql-reference/data-types/enum.md))) — Key specifies how the quota should be shared. If two connections use the same quota and key, they share the same amounts of resources. Values:
2021-01-28 10:06:44 +00:00
- `[]` — All users share the same quota.
- `['user_name']` — Connections with the same user name share the same quota.
- `['ip_address']` — Connections from the same IP share the same quota.
2021-10-16 19:22:19 +00:00
- `['client_key']` — Connections with the same key share the same quota. A key must be explicitly provided by a client. When using [clickhouse-client](../../interfaces/cli.md), pass a key value in the `--quota_key` parameter, or use the `quota_key` parameter in the client configuration file. When using HTTP interface, use the `X-ClickHouse-Quota` header.
2021-01-28 10:06:44 +00:00
- `['user_name', 'client_key']` — Connections with the same `client_key` share the same quota. If a key isnt provided by a client, the qouta is tracked for `user_name`.
- `['client_key', 'ip_address']` — Connections with the same `client_key` share the same quota. If a key isnt provided by a client, the qouta is tracked for `ip_address`.
- `durations` ([Array](../../sql-reference/data-types/array.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — Time interval lengths in seconds.
- `apply_to_all` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Logical value. It shows which users the quota is applied to. Values:
2021-01-28 10:06:44 +00:00
- `0` — The quota applies to users specify in the `apply_to_list`.
- `1` — The quota applies to all users except those listed in `apply_to_except`.
2023-03-18 02:45:43 +00:00
- `apply_to_list` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — List of user names/[roles](../../guides/sre/user-management/index.md#role-management) that the quota should be applied to.
- `apply_to_except` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — List of user names/roles that the quota should not apply to.
## See Also {#see-also}
- [SHOW QUOTAS](../../sql-reference/statements/show.md#show-quotas-statement)