1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
Quota
=====
.. contents::
:local:
:depth: 1
.. testsetup:: sys_quota
client.sys.enable_secrets_engine(
backend_type='kv',
path='kv',
)
Read Quota
---------------
.. automethod:: hvac.api.system_backend.Quota.read_quota
:noindex:
Examples
````````
.. testcode:: sys_quota
:skipif: not test_utils.is_enterprise()
import hvac
client = hvac.Client(url='https://127.0.0.1:8200')
client.sys.create_or_update_quota(name="quota1", rate=100.0)
Create or Update Quota
----------------------
.. automethod:: hvac.api.system_backend.Quota.create_or_update_quota
:noindex:
.. testcode:: sys_quota
:skipif: not test_utils.is_enterprise()
import hvac
client = hvac.Client(url='https://127.0.0.1:8200')
# Create file quota
client.sys.create_or_update_quota(name="quota1", rate=100.0)
# Update quota that already exists
client.sys.create_or_update_quota(name="quota1", rate=101.0)
List Quotas
---------------
.. automethod:: hvac.api.system_backend.Quota.list_quotas
:noindex:
Examples
````````
.. testcode:: sys_quota
:skipif: not test_utils.is_enterprise()
import hvac
client = hvac.Client(url='https://127.0.0.1:8200')
client.sys.create_or_update_quota(name="quota1", rate=1000.0, interval="10m")
client.sys.create_or_update_quota(name="quota2", rate=1000.0, path="/kv")
Delete Quota
---------------
.. automethod:: hvac.api.system_backend.Quota.delete_quota
:noindex:
Examples
````````
.. testcode:: sys_quota
:skipif: not test_utils.is_enterprise()
import hvac
client = hvac.Client(url='https://127.0.0.1:8200')
client.sys.delete_quota(name="quota1")
|