runzero.api.admin.orgs

Management of runZero organizations.

Module Contents

Classes

OrgsAdmin

Management of runZero organizations.

class runzero.api.admin.orgs.OrgsAdmin(client: runzero.client.Client)[source]

Management of runZero organizations.

Organizations are an administrative boundary for various platform-level objects and methods.

Parameters:

client (runzero.client.Client) – A handle to the runzero.Client client which manages interactions with the runZero server.

Constructor method

create(org_options: runzero.types.OrgOptions) runzero.types.Organization | None[source]

Creates a new organization in your account.

Parameters:

org_options (runzero.types.OrgOptions) – Description of organization to create

Returns:

Organization created or None

Raises:

AuthError, ClientError, ServerError

Return type:

Optional[runzero.types.Organization]

delete(org_id: uuid.UUID) None[source]

Deletes an organization with provided ID from your account.

Parameters:

org_id (uuid.UUID) – The ID of the organization to operate against

Returns:

None

Raises:

AuthError, ClientError, ServerError

Return type:

None

get(org_id: uuid.UUID | None = None, name: str | None = None) runzero.types.Organization | None[source]

Retrieves the runZero Organization with the provided name or id, if it exists in your account.

Parameters:
  • org_id (Optional[uuid.UUID]) – Optional id of the organization to retrieve

  • name (Optional[str]) – Optional name of the organization to retrieve

Returns:

Organization if found, or None

Raises:

AuthError, ClientError, ServerError

Return type:

Optional[runzero.types.Organization]

get_all() List[runzero.types.Organization][source]

Retrieves all runZero Organizations available to your account

Returns:

A list of all Organizations available to your account

Raises:

AuthError, ClientError, ServerError

Return type:

List[runzero.types.Organization]

update(org_id: uuid.UUID, org_options: runzero.types.OrgOptions) runzero.types.Organization | None[source]

Updates an organization associated with your account.

Parameters:
  • org_id (uuid.UUID) – The ID of the organization to patch

  • org_options (runzero.types.OrgOptions) – Organization’s updated values

Returns:

Organization updated or None

Raises:

AuthError, ClientError, ServerError

Return type:

Optional[runzero.types.Organization]