designate/doc/source/user/rest/admin/quotas.rst

3.6 KiB

Quotas

Overview

The quotas extension can be used to retrieve a tenant's absolute limits.

Note: Quotas is an extension and needs to be enabled before it can be used. If Designate returns a 404 error, ensure that the following line has been added to the designate.conf file under [service:api] section :

enable_api_admin = True
enabled_extensions_admin = quotas

Once these lines have been added, restart the designate-central and designate-api services.

Get Quotas

Retrieves quotas for tenant with the specified TENANT_ID. The following example retrieves the quotas for tenant 12345.

Example request:

GET /admin/quotas/12345 HTTP/1.1
Host: 127.0.0.1:9001
Accept: application/json
Content-Type: application/json

Example response:

HTTP/1.1 201 Created
Content-Type: application/json

{
  "quota": {
    "api_export_size: 1000,
    "zones": 10,
    "recordset_records": 20,
    "zone_records": 500,
    "zone_recordsets": 500
  }
}
api_export_size

Number of records allowed in a synchronous zone export done via API

form zones

Number of zones the tenant is allowed to own

form recordset_records

Number of records allowed per recordset

form zone_records

Number of records allowed per zone

form zone_recordsets

Number of recordsets allowed per zone

statuscode 200

Success

statuscode 401

Access Denied

Update Quotas

Updates the specified quota(s) to their new values.

Example request:

PATCH /admin/quotas/12345 HTTP/1.1
Host: 127.0.0.1:9001
Accept: application/json
Content-Type: application/json

{
  "quota": {
    "zones": 1000,
    "zone_records": 50
  }
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "quota": {
    "api_export_size: 1000,
    "zones": 1000,
    "recordset_records": 20,
    "zone_records": 50,
    "zone_recordsets": 500
  }
}
statuscode 200

Success

statuscode 401

Access Denied

Reset Quotas to Default

Restores the tenant's quotas back to their default values.

Example request:

DELETE /admin/quotas/12345 HTTP/1.1
Host: 127.0.0.1:9001
Accept: application/json
Content-Type: application/json

Example response:

HTTP/1.1 204 No Content
statuscode 204

No Content

statuscode 401

Access Denied