pub struct Workspace {Show 22 fields
pub name: String,
pub id: String,
pub image: String,
pub user: String,
pub cpus: Option<u32>,
pub memory: Option<String>,
pub root_size: Option<String>,
pub home_size: String,
pub env: BTreeMap<String, String>,
pub secrets: Vec<String>,
pub labels: BTreeMap<String, String>,
pub token_role: Role,
pub home_bind: Option<String>,
pub pool: Option<String>,
pub created_at: u64,
pub created_by: String,
pub updated_at: u64,
pub rebuilt_at: Option<u64>,
pub token: Option<TokenMeta>,
pub setup: Option<String>,
pub setup_state: Option<SetupState>,
pub ports: Vec<PublishedPort>,
}Expand description
A workspace’s definition.
Fields§
§name: String§id: StringStable across rebuilds; a new workspace of the same name gets a new one.
image: StringAn incus image (dev-base, images:ubuntu/24.04) or a registry
image (registry:APP:TAG).
user: StringThe workspace user: its home is the home volume.
cpus: Option<u32>§memory: Option<String>§root_size: Option<String>The root disk’s size; the pool’s default when unset.
home_size: String§env: BTreeMap<String, String>Plain variables for login shells (not secrets: use secrets).
secrets: Vec<String>Org secrets delivered as files under /run/isb/secrets/<NAME>.
labels: BTreeMap<String, String>§token_role: RoleThe role the workspace’s token has in its org.
home_bind: Option<String>A host directory bound as the home instead of a volume: under the
daemon’s --workspace-home-root, or a path a superadmin named.
isb never deletes it.
pool: Option<String>The storage pool the home volume is in, decided at create.
created_at: u64§created_by: String§updated_at: u64§rebuilt_at: Option<u64>§token: Option<TokenMeta>§setup: Option<String>A first-boot script: run once as root on the first start after a
create or a rebuild, and again on demand. Not for secrets: the
definition shows it (use secrets).
setup_state: Option<SetupState>Where the setup script is: pending, running, succeeded or failed.
ports: Vec<PublishedPort>The ports it publishes (workspace_port_add).