Tenants

Import the tenant resource module and instantiate the tenant-service client

[ ]:
from typing import Any

from peak.resources import tenants

client: tenants.Tenant = tenants.get_client()

Possible field values

Entity type

The entity type of the resource for which we want to fetch the instances. The possible values are: workflow, webapp, api-deployment, workspace, and feed.

List all available instance-options(s)

[ ]:
instance_options: dict[str, Any] = client.list_instance_options(
    entity_type="workflow",
)

"""
The instance options will be returned in the following format:

{
  "data": [
    {
      "cpu": 125,
      "gpu": null,
      "gpuMemory": null,
      "id": 20,
      "instanceClass": "Genaeral Purpose",
      "memory": 125,
      "name": "Pico (0.125CPU, 0.125GB RAM)",
      "provider": "k8s",
      "providerInstanceId": null
    }
  ]
}
"""