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.

Usage

rpk cluster quotas import [flags]

Flags

Value Type Description

--from

string

Either the quotas or a path to a file containing the quotas to import; check help text for more information.

-h, --help

-

Help for import.

--no-confirm

-

Disable confirmation prompt.

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings. See rpk -X or execute rpk -X help for inline detail or rpk -X list for terser detail.

--profile

string

Profile to use. See rpk profile for more details.

-v, --verbose

-

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"
'