pub struct Instance {Show 17 fields
pub name: String,
pub urn: 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,
}Expand description
A virtual machine in one zone.
Fields§
§name: StringThe instance’s resource name.
urn: StringThe instance’s URN, the identifier access policies and the audit log use.
instance_type: StringThe instance type, instanceTypes/{instance_type}, such as
instanceTypes/gp1.core.2: one whose available is true. Changing it
needs the instance instance::State::Stopped.
image: StringThe image the boot volume is created from, in the instance’s zone: one
of the project’s own, projects/{project}/zones/{zone}/images/{image},
or a public one, 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 image family to launch the current public image of,
imageFamilies/{image_family}. Set exactly one of image and
image_family. Empty when the instance was launched from an image.
key_pair: StringThe 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, 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 before interfaces were named at launch shows the interface created for it, 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, such as user:<id> or
service_account:<id>.
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 service account the instance runs as,
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.
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.