/sys/quotas/lease-count
Enterprise Only – These endpoints require Vault Enterprise Platform.
The /sys/quotas/lease-count
endpoint is used to create, edit and delete lease count quotas.
Create or Update a Lease Count Quota
This endpoint is used to create a lease count quota with an identifier, name
.
A lease count quota must include a max_leases
value with an optional path
that can either be a namespace or mount.
Method | Path |
---|---|
POST | /sys/quotas/lease-count/:name |
Parameters
name
(string: "")
- The name of the quota.path
(string: "")
- Path of the mount or namespace to apply the quota. A blank path configures a global lease count quota. For examplenamespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds a quota touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota.max_leases
(int: 0)
- Maximum number of leases allowed by the quota rule.
Sample Payload
{ "path": "", "max_leases": 1000}
Sample Request
$ curl \ --request POST \ --header "X-Vault-Token: ..." \ --data @payload.json \ http://127.0.0.1:8200/v1/sys/quotas/lease-count/global-lease-count-quota
Delete a Lease Count Quota
A lease count quota can be deleted by name
.
Method | Path |
---|---|
DELETE | /sys/quotas/lease-count/:name |
Sample Request
$ curl \ --request DELETE \ --header "X-Vault-Token: ..." \ http://127.0.0.1:8200/v1/sys/quotas/lease-count/global-lease-count-quota
Get a Lease Count Quota
A lease count quota can be retrieved by name
.
Method | Path |
---|---|
GET | /sys/quotas/lease-count/:name |
Sample Request
$ curl \ --request GET \ --header "X-Vault-Token: ..." \ http://127.0.0.1:8200/v1/sys/quotas/lease-count/global-lease-count-quota
Sample Response
{ "request_id": "21514bc6-2c19-42b9-a8a7-cab27aff5815", "lease_id": "", "lease_duration": 0, "renewable": false, "data": { "max_leases": 1000, "name": "global-lease-count-quota", "path": "", "type": "lease-count" }, "warnings": null}