With the CLI you can view, create, modify and delete quotas.The commands for these actions are shown in the table below.
clients
users
lenses-cli quotas
# Creation example lenses-cli quota users set --quota-user="user" \ --quota-config='{"producer_byte_rate": "100000","consumer_byte_rate": "200000","request_percentage": "75"}' # Update example lenses-cli quota users set --quota-user="user" \ --quota-config='{"producer_byte_rate": "1000000","consumer_byte_rate": "2000000","request_percentage": "15"}'
# Creation example lenses-cli quota clients set --quota-client="test" \ --quota-config='{"producer_byte_rate": "100000","consumer_byte_rate": "200000","request_percentage": "75"}' # Update example lenses-cli quota clients set --quota-client="test" \ --quota-config='{"producer_byte_rate": "1000000","consumer_byte_rate": "2000000","request_percentage": "75"}'
You can create and update quotas using a file
# Delete users quota example lenses-cli quota users set ./quota.yaml
File example:
- type: USER config: producerByteRate: "1024000" consumerByteRate: "1024000" requestPercentage: "10" user: [USER_NAME] client: [CLIENT_NAME]
# Delete users quota example lenses-cli quota users delete --quota-client="*" \ producer_byte_rate consumer_byte_rate request_percentage
lenses-cli quota users delete
lenses-cli quota users delete \ --quota-user="user"
lenses-cli quota users delete \ --quota-user="user" \ --quota-client="clientID"
lenses-cli quota users delete \ --quota-user="user" \ request_percentage
If empty then all properties will be passed on automatically and the client quota will be removed entirely.
lenses-cli quota clients delete \ producer_byte_rate consumer_byte_rate request_percentage
lenses-cli quota clients delete
lenses-cli quota clients delete \ --quota-client="clientID"
lenses-cli quota clients delete \ --quota-client="clientID" \ request_percentage
On this page