Skip to content

Quota

get_quota(id) async

Get a quota by id.

Parameters:

Name Type Description Default
id int

The id of the quota to get.

required

Returns:

Type Description
Quota

The quota

update_quota(id, quota) async

Update a quota.

Parameters:

Name Type Description Default
id int

The id of the quota to update.

required
quota QuotaUpdateReq

The new quota values. QuotaUpdateReq.hard allows assignment of any attribute with an int value.

Example:

QuotaUpdateReq(
    hard={"storage": 100000, "other_property": 1234}
)

required

get_quotas(reference=None, reference_id=None, sort=None, page=1, page_size=10, limit=None, **kwargs) async

Get quotas.

Parameters:

Name Type Description Default
reference str

The reference type of the quota. TODO: document what these values can be.

None
reference_id str

The reference id of the quota

None
sort str

Sort method. Valid values include:

- `"hard.resource_name"`
- `"-hard.resource_name"`
- `"used.resource_name"`
- `"-used.resource_name"`

- denotes descending order

resource_name should be the real resource name of the quota

None
page int

The page number to retrieve resources from.

1
page_size int

The number of resources to retrieve per page.

10
limit int

The maximum number of quotas to retrieve.

None

Returns:

Type Description
List[Quota]

The quotas