rpk cluster quotas import
Use this command to import client quotas in the format produced by rpk cluster quotas describe --format json/yaml
.
The schema of the import string matches the schema from rpk cluster quotas describe --format help
:
-
YAML
-
JSON
quotas:
- entity:
- name: string
- type: string
values:
- key: string
- values: string
{
"quotas": [
{
"entity": [
{
"name": "string",
"type": "string"
}
],
"values": [
{
"key": "string",
"values": "string"
}
]
}
]
}
Use the '--no-confirm' flag if you wish to avoid the confirmation prompt.
Flags
Value | Type | Description |
---|---|---|
|
string |
Either the quotas or a path to a file containing the quotas to import; check help text for more information. |
|
- |
Help for import. |
|
- |
Disable confirmation prompt. |
|
string |
Redpanda or |
|
stringArray |
Override |
|
string |
Profile to use. See |
|
- |
Enable verbose logging. |
Examples
Import client quotas from a file:
rpk cluster quotas import --from /path/to/file
Import client quotas from a string:
rpk cluster quotas import --from '{"quotas":...}'
Import client quotas from a JSON string:
rpk cluster quotas import --from '
{
"quotas": [
{
"entity": [
{
"name": "retrievals-",
"type": "client-id-prefix"
}
],
"values": [
{
"key": "consumer_byte_rate",
"value": "140000"
}
]
},
{
"entity": [
{
"name": "consumer-1",
"type": "client-id"
}
],
"values": [
{
"key": "producer_byte_rate",
"value": "140000"
}
]
}
]
}
'
Import client quotas from a YAML string:
rpk cluster quotas import --from '
quotas:
- entity:
- name: retrievals-
type: client-id-prefix
values:
- key: consumer_byte_rate
value: "140000"
- entity:
- name: consumer-1
type: client-id
values:
- key: producer_byte_rate
value: "140000"
'