Cloud images and runtimes
Fleet image resources and the runtime (gVisor or KubeVirt) each image runs on.
Fleet image resources and the runtime (gVisor or KubeVirt) each image runs on.
Which cloud runtime an image needs, and the Fleet image resources of a namespace.
Methods of Fleet.
Fleet.create_image#Creates an image resource (remote build) from a JSON manifest.
async def create_image(self, namespace: str, manifest_json: str) -> str| Parameter | Type | Default |
|---|---|---|
namespace | String | required |
manifest_json | String | required |
Returns String · Async · Raises CuaError
Fleet.get_image#Gets an image resource (JSON).
async def get_image(self, namespace: str, name: str) -> str| Parameter | Type | Default |
|---|---|---|
namespace | String | required |
name | String | required |
Returns String · Async · Raises CuaError
Fleet.list_images#Lists image resources (JSON) in a namespace.
async def list_images(self, namespace: str) -> List[str]| Parameter | Type | Default |
|---|---|---|
namespace | String | required |
Returns Vec<String> · Async · Raises CuaError
Fleet.delete_image#Deletes an image resource.
async def delete_image(self, namespace: str, name: str) -> None| Parameter | Type | Default |
|---|---|---|
namespace | String | required |
name | String | required |
Async · Raises CuaError
fleet_resolve_runtime#The Fleet runtime for image: runtime (kubevirt, gvisor) when
given, else the one the image needs. What the image is
comes from its registry manifest (read with docker, ghcr and ECR
credentials): a KubeVirt containerDisk (a /disk/disk.img layer or
trycua containerDisk media types) runs on kubevirt, a container rootfs
on gvisor. When the manifest cannot be read and no runtime is given,
the runtime is guessed from the reference with a warning (a docker-
tag runs on gvisor, anything else on kubevirt). Raises
InvalidArgument only for a runtime the image cannot run on, and
Unsupported for a macOS image or runtime macos (Fleet does not offer
macOS in this SDK). Blocks
while the registry is read (at most 20 s; CUA_FLEET_IMAGE_INSPECT=0
skips it). The one copy of this rule; cua-sandbox calls it.
def fleet_resolve_runtime(runtime: Optional[str], image: str) -> str| Parameter | Type | Default |
|---|---|---|
runtime | Option<String> | required |
image | String | required |
Returns String · Raises CuaError (InvalidArgument, Unsupported)
fleet_check_runtime#fleet_resolve_runtime with the image variant already known
(variant as fleet_image_variant returns it); None means the
manifest could not be read (an unset runtime then falls back to the
reference). Pure (no registry read).
def fleet_check_runtime(runtime: Optional[str], image: str, variant: Optional[str]) -> str| Parameter | Type | Default |
|---|---|---|
runtime | Option<String> | required |
image | String | required |
variant | Option<String> | required |
Returns String · Raises CuaError
fleet_image_variant#The variant of an image from its registry documents (manifest: an
image manifest or index, config: the platform manifest's config blob):
container-disk, rootfs or other. Pure (no registry read). A macOS
image raises Unsupported.
def fleet_image_variant(manifest: str, config: Optional[str]) -> str| Parameter | Type | Default |
|---|---|---|
manifest | String | required |
config | Option<String> | required |
Returns String · Raises CuaError (Unsupported)
FleetBillingCard record#The saved card (Fleet.billing_status): never its number.
| Field | Type | Default | Description |
|---|---|---|---|
brand | String | visa, mastercard, ... | |
last4 | String | Last four digits. | |
exp_month / expMonth | u32 | Expiry month. | |
exp_year / expYear | u32 | Expiry year. |
FleetBillingCredit record#The account's Cua Cloud credit.
| Field | Type | Default | Description |
|---|---|---|---|
balance_usd_cents / balanceUsdCents | i64 | What is left, US cents. | |
signup_grant_usd_cents / signupGrantUsdCents | i64 | The signup grant's amount, US cents (0: none). | |
signup_grant_unused / signupGrantUnused | bool | A signup grant exists and none of it has been used. |
FleetBillingStatus record#The account's Cua Cloud billing (GET /api/billing/status).
Returned by Fleet.billing_status.
| Field | Type | Default | Description |
|---|---|---|---|
billing_enabled / billingEnabled | bool | Billing is on for this account. | |
payment_method_present / paymentMethodPresent | bool | A default card is saved. | |
card | Option<FleetBillingCard> | That card. | |
plan | String | none, payg, or a plan key. | |
payg_available / paygAvailable | bool | A card can be added for pay as you go. | |
credit | Option<FleetBillingCredit> | The account's credit, when Fleet has credit for it. | |
billing_url / billingUrl | Option<String> | The website billing page (credit, cards, plans). |
FleetSizeLimits record#The everyday sizes of a cloud sandbox, which the Cua apps offer
(cua_fleet::CLOUD_DEFAULT_RANGE_CPUS,
cua_fleet::CLOUD_DEFAULT_RANGE_MEMORY_MB).
Returned by fleet_size_limits.
| Field | Type | Default | Description |
|---|---|---|---|
min_cpus / minCpus | u32 | Fewest vCPUs. | |
max_cpus / maxCpus | u32 | Most vCPUs. | |
min_memory_mb / minMemoryMb | u32 | Least memory, MiB. | |
max_memory_mb / maxMemoryMb | u32 | Most memory, MiB. |
FleetUsagePricing record#This account's Cua Cloud rates (Fleet.usage_pricing). Fleet bills
the vCPUs and memory a sandbox reserves, per hour; disk is not metered.
Returned by Fleet.usage_pricing.
| Field | Type | Default | Description |
|---|---|---|---|
vcpu_hour_usd / vcpuHourUsd | f64 | USD per reserved vCPU per hour. | |
memory_gib_hour_usd / memoryGibHourUsd | f64 | USD per reserved GiB of memory per hour. |
fleet_size_limits#The everyday sizes of a cloud sandbox (1-8 vCPUs, 1-32 GiB), which the
Cua apps offer. The SDK does not enforce them: it accepts up to 64 vCPUs
and 512 MiB to 512 GiB, and Fleet decides what an account may run (a
size over the account's limits fails with FleetAdmissionDenied).
def fleet_size_limits() -> FleetSizeLimitsReturns FleetSizeLimits