pub struct Instance {Show 17 fields
pub name: String,
pub instance_type: String,
pub image: String,
pub image_family: String,
pub key_pair: String,
pub login_user: String,
pub boot_volume: Option<BootVolume>,
pub network_interfaces: Vec<String>,
pub state: i32,
pub state_reason: String,
pub health: Option<InstanceHealth>,
pub create_time: Option<Timestamp>,
pub creator: String,
pub tags: BTreeMap<String, String>,
pub interface_addresses: Vec<InterfaceAddresses>,
pub service_account: String,
pub launch_template: String,
}Expand description
A virtual machine in one zone.
Fields§
§name: StringThe instance’s resource name.
instance_type: StringThe instance type by its full name,
//compute.origincloudapis.eu/instanceTypes/{instance_type}, such as
//compute.origincloudapis.eu/instanceTypes/gp1.core.2: one whose
available is true. Changing it
needs the instance instance::State::Stopped.
image: StringThe full name of the image the boot volume is created from, in the
instance’s zone: one of the project’s own,
//compute.origincloudapis.eu/projects/{project}/zones/{zone}/images/{image},
or a public one, //compute.origincloudapis.eu/zones/{zone}/images/{image}. Set exactly one of
image and image_family; launched from a family, this is the public
image the family resolved to.
image_family: StringThe full name of the image family to launch the current public image
of, //compute.origincloudapis.eu/imageFamilies/{image_family}. Set exactly one of image and
image_family. Empty when the instance was launched from an image.
key_pair: StringThe full name of the key pair whose public key is installed for
login_user, in the instance’s project.
login_user: StringThe account to log in as: a user created at first boot that holds the
key pair. A POSIX user name of at most 32 lowercase letters, digits,
underscores and hyphens, starting with a letter or an underscore, and
not root. The image’s default_user when left empty.
boot_volume: Option<BootVolume>The boot volume: its size and storage class at launch, and the volume. The image’s size on the default storage class when left out.
network_interfaces: Vec<String>The network interfaces’ full names, in device order, the boot interface first; exactly one today. Each is an existing interface in the instance’s project and zone that nothing else holds, created with the network service: its subnet and security groups are the instance’s. Terminating the instance releases it, and it stays. An instance launched from a recipe with an interface spec, or before interfaces were named at launch, shows the interface created for it once it exists, which is deleted with the instance.
state: i32Where the instance is in its lifecycle.
state_reason: StringWhy the instance is instance::State::Failed, or why a instance::State::Stopped instance went down
when the machine it ran on failed; empty otherwise.
health: Option<InstanceHealth>Whether the platform can currently confirm the instance is working,
which state doesn’t say: a instance::State::Running instance on a machine that
stopped answering is still instance::State::Running.
create_time: Option<Timestamp>When the instance was launched.
creator: StringThe principal that launched the instance, by its full name on iam:
//iam.origincloudapis.eu/users/{user},
//iam.origincloudapis.eu/organizations/{organization}/serviceAccounts/{service_account},
or a platform service agent’s or service’s name when the platform did.
Labels of your own, at most 50. The origin:name tag is the name the
console shows.
interface_addresses: Vec<InterfaceAddresses>Each network interface’s private addresses, in the order of
network_interfaces; an interface not attached yet has none.
service_account: StringThe full name of the service account the instance runs as,
//iam.origincloudapis.eu/organizations/{organization}/serviceAccounts/{service_account}: a
WORKLOAD service account of the instance’s organization that isn’t
deleted. Launching with one, or updating the instance to one, needs
iam.service_account.act_as on the organization as well; an update
that leaves it empty removes it, and a terminated instance’s can’t
change. Empty for an instance that runs as none.
launch_template: StringThe full name of the launch template version the instance was launched
from,
//compute.origincloudapis.eu/projects/{project}/launchTemplates/{launch_template}@{version},
with the number the launch resolved @default or @latest to. Empty
for an instance launched without a template. The template may since
have been changed or deleted.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Instance
impl<'de> Deserialize<'de> for Instance
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for Instance
impl Message for Instance
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.