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

GET /quotas/TENANT_ID

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 Parameters:
 
  • zones – Number of zones the tenant is allowed to own
  • recordset_records – Number of records allowed per recordset
  • zone_records – Number of records allowed per zone
  • zone_recordsets – Number of recordsets allowed per zone
Status Codes:

Update Quotas

PATCH /quotas/TENANT_ID

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
  }
}
Status Codes:

Reset Quotas to Default

DELETE /quotas/TENANT_ID

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
Status Codes:

Table Of Contents

Previous topic

Synchronize

Next topic

Installing Kilo on Ubuntu

Project Source

This Page