Skip to content

Quota

Budgets, project quota, presets and requests for more.

Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.

Request and response examples are generated from the schema; the tables under Schemas are the reference.

Get the organization's budgets

GET /v1/orgs/{org_id}/entitlements

For each location: the budget per resource class, how much of it is allocated to projects and how much is left.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No

Responses

{
    "caps": [
        {
            "allocated": "string",
            "cap": "string",
            "display_name": "string",
            "resource_class": "string",
            "unit": "string"
        }
    ],
    "locations": [
        {
            "allowed": true,
            "classes": [
                {
                    "allocated": "string",
                    "available": "string",
                    "budget": "string",
                    "display_name": "string",
                    "max_value": "string",
                    "resource_class": "string",
                    "status": "string",
                    "tier_default": "string",
                    "unit": "string"
                }
            ],
            "data_as_of": "2022-04-13T15:42:05.901Z",
            "display_name": "string",
            "location": "string",
            "placements": 0,
            "slug": "string"
        }
    ],
    "managed": [
        {
            "display_name": "string",
            "limit": "string",
            "per": "string",
            "resource_class": "string",
            "unit": "string"
        }
    ],
    "projects": {
        "limit": 0,
        "used": 0
    },
    "tier": "string"
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Get a project's quota in one location

GET /v1/orgs/{org_id}/projects/{project_id}/placements/{placement_id}/quota

Per resource class: what is set, what the location applied and what is in use, with the version for If-Match.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No
placement_id path string No
project_id path string No

Responses

{
    "advisory": true,
    "budget": {},
    "classes": [
        {
            "applied": {
                "enforced": true,
                "reason": "string",
                "state": "string",
                "value": "string"
            },
            "below_in_use": true,
            "control": "string",
            "desired": "string",
            "display_name": "string",
            "in_use": {
                "data_as_of": "2022-04-13T15:42:05.901Z",
                "reason": "string",
                "state": "string",
                "value": "string"
            },
            "managed_limit": "string",
            "max_value": "string",
            "resource_class": "string",
            "status": "string",
            "unit": "string"
        }
    ],
    "customized": true,
    "data_as_of": "2022-04-13T15:42:05.901Z",
    "managed": true,
    "placement": {
        "deployment": "string",
        "id": "string",
        "location": "string"
    },
    "quota_profile": "string",
    "status": {
        "conditions": [
            {
                "reason": "string",
                "scope": "string",
                "since": "2022-04-13T15:42:05.901Z",
                "status": "string",
                "type": "string"
            }
        ],
        "generation": 0,
        "observed_generation": 0
    },
    "version": "string"
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Set a project's quota in one location

PATCH /v1/orgs/{org_id}/projects/{project_id}/placements/{placement_id}/quota

Sets quota values for the project in one location, out of the organization's budget there. Send the current version in If-Match. Answers 202 with an operation while the location applies it.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
if-match header string Yes
org_id path string No
placement_id path string No
project_id path string No

Request body

{
    "confirm_below_in_use": true,
    "values": {}
}

Responses

{
    "changes": {},
    "placement": {
        "id": "string",
        "version": "string"
    }
}
{
    "changes": {},
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    },
    "placement": {
        "id": "string",
        "version": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Get a project's quota

GET /v1/orgs/{org_id}/projects/{project_id}/quota

The project's quota in each of its locations: per resource class, what is set, what each location applied and what is in use.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No
project_id path string No

Responses

{
    "data_as_of": "2022-04-13T15:42:05.901Z",
    "items": [
        null
    ]
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Get every project's quota

GET /v1/orgs/{org_id}/quota-allocations

For each location: the budget per resource class and every project's quota there, and whether the caller may change them.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No

Responses

{
    "allocatable": true,
    "data_as_of": "2022-04-13T15:42:05.901Z",
    "locations": [
        {
            "classes": [
                {
                    "allocated": "string",
                    "available": "string",
                    "budget": "string",
                    "display_name": "string",
                    "resource_class": "string",
                    "unit": "string"
                }
            ],
            "display_name": "string",
            "location": "string",
            "projects": [
                {
                    "placement": "string",
                    "project": {
                        "display_name": "string",
                        "id": "string",
                        "slug": "string"
                    },
                    "quota": {},
                    "version": "string"
                }
            ],
            "slug": "string"
        }
    ],
    "managed": [
        {
            "display_name": "string",
            "limit": "string",
            "per": "string",
            "resource_class": "string",
            "unit": "string"
        }
    ]
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Choose the default quota preset

PUT /v1/orgs/{org_id}/quota-default

Sets the preset new projects start from.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No

Request body

{
    "preset": "string"
}

Responses

{
    "chosen": "string",
    "default_profile": "string"
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Create a quota preset

POST /v1/orgs/{org_id}/quota-presets

Saves a named set of per-class quota values that new projects can start from.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No

Request body

{
    "display_name": "string",
    "name": "string",
    "values": {}
}

Responses

{
    "custom": true,
    "display_name": "string",
    "name": "string",
    "values": {},
    "version": 0
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Delete a quota preset

DELETE /v1/orgs/{org_id}/quota-presets/{name}

Deletes one of the organization's own presets.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
name path string No
org_id path string No

Responses

{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Change a quota preset

PATCH /v1/orgs/{org_id}/quota-presets/{name}

Changes a preset's name or values. Projects that already started from it keep their quota.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
if-match header string Yes
name path string No
org_id path string No

Request body

{
    "display_name": "string",
    "values": {}
}

Responses

{
    "custom": true,
    "display_name": "string",
    "name": "string",
    "values": {},
    "version": 0
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

List quota presets

GET /v1/orgs/{org_id}/quota-profiles

The presets a project's quota can start from, the one new projects get, and the limits each resource class allows.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No

Responses

{
    "chosen": "string",
    "classes": [
        {
            "control": "string",
            "display_name": "string",
            "managed_limit": "string",
            "max_value": "string",
            "resource_class": "string",
            "status": "string",
            "unit": "string"
        }
    ],
    "custom": [
        {
            "custom": true,
            "display_name": "string",
            "name": "string",
            "values": {},
            "version": 0
        }
    ],
    "default_profile": "string",
    "profiles": [
        {
            "display_name": "string",
            "name": "string",
            "values": {}
        }
    ]
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

List budget requests

GET /v1/orgs/{org_id}/quota-requests

The organization's requests to the provider for a larger budget, and what was decided.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No

Responses

{
    "items": [
        {
            "created_at": "2022-04-13T15:42:05.901Z",
            "decided_at": "2022-04-13T15:42:05.901Z",
            "decision_note": "string",
            "id": "string",
            "location": "string",
            "reason": "string",
            "requested_by": "string",
            "state": "string",
            "values": {},
            "version": 0
        }
    ]
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Ask for a larger budget

POST /v1/orgs/{org_id}/quota-requests

Asks the provider for more of one or more resource classes in a location, with a reason.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No

Request body

{
    "location": "string",
    "reason": "string",
    "values": {}
}

Responses

{
    "created_at": "2022-04-13T15:42:05.901Z",
    "decided_at": "2022-04-13T15:42:05.901Z",
    "decision_note": "string",
    "id": "string",
    "location": "string",
    "reason": "string",
    "requested_by": "string",
    "state": "string",
    "values": {},
    "version": 0
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Cancel a budget request

POST /v1/orgs/{org_id}/quota-requests/{request_id}:cancel

Withdraws a request that has not been decided yet.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
org_id path string No
request_id path string No

Responses

{
    "created_at": "2022-04-13T15:42:05.901Z",
    "decided_at": "2022-04-13T15:42:05.901Z",
    "decision_note": "string",
    "id": "string",
    "location": "string",
    "reason": "string",
    "requested_by": "string",
    "state": "string",
    "values": {},
    "version": 0
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Schemas

AllocatedProject

Name Type Description
placement string The project's placement there (plc_…).
project ProjectRef
quota Per resource class.
version string For If-Match when setting its quota.

AllocationLocation

Name Type Description
classes Array<BudgetClass>
display_name string
location string
projects Array<AllocatedProject>
slug string

AppliedQuota

Name Type Description
enforced boolean | null
reason string | null
state string applied, pending, failed, removed or not_enforced.
value string | null

BudgetClass

Name Type Description
allocated string Given to the organization's projects there.
available string
budget string
display_name string
resource_class string
unit string

BudgetLeft

Name Type Description
allocated string
available string
budget string

BudgetRequest

Name Type Description
created_at string(date-time)
decided_at string(date-time) | null
decision_note string | null
id string The request (qrq_…).
location string
reason string
requested_by string
state string open, approved, rejected or cancelled.
values Per resource class.
version integer

BudgetRequestList

Name Type Description
items Array<BudgetRequest>

Ceiling

Name Type Description
allocated string Given to projects in all locations together.
cap string
display_name string
resource_class string
unit string

ChangedPlacement

Name Type Description
id string
version string The new version, also the ETag.

DefaultBody

Name Type Description
preset string | null

DefaultPreset

Name Type Description
chosen string | null
default_profile string | null

EntitledClass

Name Type Description
allocated string Given to the organization's projects there.
available string
budget string
display_name string
max_value string
resource_class string
status string
tier_default string The budget the organization's tier comes with.
unit string

EntitledLocation

Name Type Description
allowed boolean
classes Array<EntitledClass>
data_as_of string(date-time)
display_name string
location string The location (loc_…).
placements integer How many project locations it has there.
slug string

Entitlements

Name Type Description
caps Array<Ceiling>
locations Array<EntitledLocation>
managed Array<ManagedClass>
projects ProjectLimit
tier string

HTTPValidationError

Name Type Description
detail Array<ValidationError>

InUse

Name Type Description
data_as_of string(date-time) | null
reason string | null
state string
value string | null Null while it is not known.

ManagedClass

Name Type Description
display_name string
limit string
per string
resource_class string
unit string
Name Type Description
href string Where to read the operation; also the Location header.
id string The operation's ID (op_…).
state string | null Its state when accepted, normally queued.

OwnPreset

Name Type Description
custom boolean
display_name string
name string
values Per resource class.
version integer

PlacementQuota

Name Type Description
advisory boolean
budget To callers who may read the budgets: the location's budget per class.
classes Array<PlacementQuotaClass>
customized boolean Whether a value differs from the preset's.
data_as_of string(date-time)
managed boolean
placement QuotaPlacement
quota_profile string | null
status QuotaStatus
version string Also the ETag, for If-Match when setting it.

PlacementQuotaClass

Name Type Description
applied AppliedQuota What the location applied.
below_in_use boolean Whether what is set is below what is in use.
control string allocated: a figure is set per project; managed: NubeStack Cloud sets it.
desired string | null What is set.
display_name string
in_use InUse
managed_limit string A managed class only: its fixed limit per project location.
max_value string The most any project may be given.
resource_class string Such as instances, cores or volume_gigabytes.
status string
unit string

Preset

Name Type Description
custom boolean
display_name string
name string `custom:`.
values Per resource class.
version integer Its version, also its ETag.

PresetBody

Name Type Description
display_name string
name string
values

PresetPatch

Name Type Description
display_name string | null
values

PresetValue

Name Type Description
minimum string
value string

ProjectLimit

Name Type Description
limit integer | null How many projects it may have; null: no limit.
used integer

ProjectQuota

Name Type Description
data_as_of string(date-time)
items Array<>

ProjectRef

Name Type Description
display_name string
id string The project (prj_…).
slug string

QuotaAllocations

Name Type Description
allocatable boolean Whether the caller may change them.
data_as_of string(date-time)
locations Array<AllocationLocation>
managed Array<ManagedClass>

QuotaChange

Name Type Description
from string
to string

QuotaChangeAccepted

Name Type Description
changes Per resource class that changed.
operation OperationLink
placement ChangedPlacement

QuotaChanged

Name Type Description
changes Per resource class that changed.
placement ChangedPlacement

QuotaCondition

Name Type Description
reason string | null
scope string
since string(date-time)
status string
type string

QuotaPatch

Name Type Description
confirm_below_in_use boolean
values

QuotaPlacement

Name Type Description
deployment string
id string The project's placement (plc_…).
location string

QuotaProfiles

Name Type Description
chosen string | null The organization's own choice; null: its tier's or the platform's applies.
classes Array<ResourceClassView>
custom Array<OwnPreset> The organization's own presets.
default_profile string | null The preset the next new project gets.
profiles Array<StarterPreset> The provider's presets.

QuotaStatus

Name Type Description
conditions Array<QuotaCondition>
generation integer
observed_generation integer

QuotaUnavailable

Name Type Description
error string
placement QuotaPlacement

RequestBody

Name Type Description
location string
reason string
values

RequestedValue

Name Type Description
current string
requested string

ResourceClassView

Name Type Description
control string allocated: a figure is set per project; managed: NubeStack Cloud sets it.
display_name string
managed_limit string A managed class only: its fixed limit per project location.
max_value string The most any project may be given.
resource_class string Such as instances, cores or volume_gigabytes.
status string
unit string

StarterPreset

Name Type Description
display_name string
name string
values Per resource class.

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string