pub struct Instance {Show 18 fields
pub id: String,
pub crn: String,
pub name: String,
pub description: Option<String>,
pub task_state: Option<Nullable<String>>,
pub flavor: ResourceRef,
pub image: InstanceImage,
pub user_data: Option<String>,
pub iam_role: InstanceIamRole,
pub metadata: Option<Metadata>,
pub tags: Option<Tags>,
pub faults: Vec<Fault>,
pub created_at: String,
pub updated_at: String,
pub launched_at: Option<Nullable<String>>,
pub terminated_at: Option<Nullable<String>>,
pub desired_state: InstanceDesiredState,
pub current_state: CurrentState,
}Fields§
§id: String§crn: StringCloud Resource Name
name: StringResource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
description: Option<String>§task_state: Option<Nullable<String>>In-flight transition, if any; null when settled.
flavor: ResourceRefFlavor identity. Every instance has a flavor; query the flavor resource for CPU and RAM.
image: InstanceImagePinned source image identity, or null for a volume-only boot.
user_data: Option<String>Base64-encoded cloud-init user-data supplied at launch.
iam_role: InstanceIamRoleAttached IAM role identity, or null when no role is attached. Deleted roles retain their identity without name.
metadata: Option<Metadata>§faults: Vec<Fault>Active faults ordered by last_at descending, then internal history id descending for a stable tie-breaker. Healthy resources return [].
created_at: String§updated_at: String§launched_at: Option<Nullable<String>>§terminated_at: Option<Nullable<String>>§desired_state: InstanceDesiredStateWhat was asked for. Only three values, because there are only three things you can ask an instance to be: Create/Start/Reboot ask for running, Stop for stopped, Delete for deleted.
current_state: CurrentStateWhere the instance actually is. Read this one to answer “is it up” — the transitional states live here, not on desired_state, because nobody asks for stopping. desired_state=running with current_state=stopped is an instance that was asked to start and has not come up yet.