air_sdk.endpoints.organizations

View as Markdown

Stub file for organizations / resource budgets endpoint type hints.

Attributes

Classes

NameDescription
OrganizationRepresents an organization and its resource budget in the Air platform.
OrganizationEndpointAPIAPI client for Organization / ResourceBudget endpoints.

Module Contents

class air_sdk.endpoints.organizations.Organization

Bases: air_sdk.air_model.AirModel

Represents an organization and its resource budget in the Air platform.

This model combines organization metadata with resource budget information.

id: str

Unique identifier for the resource budget

Timestamp when the resource budget was created

Timestamp when the resource budget was last modified

org_display_name: str

Display name of the organization

org_nca_id: str

NCA ID of the organization

cpu: int | float

Number of CPU cores allocated

memory: int | float

Memory allocated, in MiB

disk_storage_total: int | float

Total disk storage allocated, in GB

disk_storage_per_node: int

Disk storage per node, in GB

image_storage: int

Image storage allocated, in GB

userconfigs: int

Total UserConfig content allocated, in bytes

Current resource usage

name: str

Organization name (alias for org_display_name).

get_model_api() -> type[OrganizationEndpointAPI]
model_api: OrganizationEndpointAPI
class air_sdk.endpoints.organizations.OrganizationEndpointAPI

Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.organizations.Organization]

API client for Organization / ResourceBudget endpoints.

This endpoint is read-only and provides access to organization resource budget information.

Also aliased as ResourceBudgetEndpointAPI.

API_PATH: str
list(
*,
limit: int = ...,
offset: int = ...,
ordering: str = ...,
org_display_name: str = ...,
org_nca_id: str = ...,
search: str = ...

List all organizations / resource budgets with optional filtering.

Parameters:

  • limit – Maximum number of results to return per page
  • offset – The initial index from which to return the results
  • ordering – Order by field. Prefix with ”-” for descending order
  • org_display_name – Filter by the display name of the organization
  • org_nca_id – Filter by the NCA ID of the organization
  • search – Search resource budgets by org_display_name

Returns:

Iterator of Organization instances

Example:

>>> # List all organizations
>>> for org in api.organizations.list():
... print(org.name, org.org_nca_id)
>>> # Filter by org_nca_id
>>> for org in api.organizations.list(org_nca_id='nca-123'):
... print(org.name)
>>> # Search by name
>>> for org in api.organizations.list(search='NVIDIA'):
... print(org.name)
get(pk: PrimaryKey) -> Organization

Get a specific organization / resource budget by ID.

Parameters:

  • pk – The resource budget ID (string or UUID)

Returns:

The Organization instance

Example:

>>> org = api.organizations.get('b4d0480c-6f0b-4c40-b143-c141531fc14e')
>>> print(org.name, org.cpu, org.memory)
ResourceBudget
ResourceBudgetEndpointAPI