pub struct LaunchTemplateData {
pub instance_type: String,
pub image: String,
pub image_family: String,
pub key_pair: String,
pub login_user: String,
pub boot_volume: Option<LaunchTemplateBootVolume>,
pub service_account: String,
pub tags: BTreeMap<String, String>,
pub network_interfaces: Vec<LaunchTemplateNetworkInterface>,
pub local_disks: Vec<LocalDisk>,
pub shutdown_behavior: i32,
}Expand description
The recipe for an instance: what to launch, and the specs of what the launch creates for it. A launch reads the recipe and sets up what it needs: a network interface described by a spec is created for the instance, and deleted when the instance is terminated.
Fields§
§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.
image: StringThe full name of the image the boot volume is created from, in the
launch’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.
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.
key_pair: StringThe full name of the key pair whose public key is installed for
login_user, in the launch’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<LaunchTemplateBootVolume>The boot volume’s size and storage class. The image’s size on the default storage class when left out.
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 project’s organization that isn’t
deleted. Launching with one needs iam.service_account.act_as on the
organization as well. Empty for an instance that runs as none.
Labels of your own for the instance, at most 50. The origin:name tag
is the name the console shows.
network_interfaces: Vec<LaunchTemplateNetworkInterface>The instance’s network interfaces, in device order, the boot interface first; at most one today. Left empty, the instance gets one interface created from an empty spec: in the project’s default subnet, with the VPC’s default security group.
local_disks: Vec<LocalDisk>Disks on the machine the instance runs on, beside its boot volume, created blank at launch; at most 16. A local disk is temporary: it comes back empty after every stop and start and after its machine restarts, and it is deleted with the instance.
shutdown_behavior: i32What happens when the instance’s operating system shuts it down. ShutdownBehavior::Stop
when left unspecified.
Implementations§
Source§impl LaunchTemplateData
impl LaunchTemplateData
Sourcepub fn shutdown_behavior(&self) -> ShutdownBehavior
pub fn shutdown_behavior(&self) -> ShutdownBehavior
Returns the enum value of shutdown_behavior, or the default if the field is set to an invalid enum value.
Sourcepub fn set_shutdown_behavior(&mut self, value: ShutdownBehavior)
pub fn set_shutdown_behavior(&mut self, value: ShutdownBehavior)
Sets shutdown_behavior to the provided enum value.
Trait Implementations§
Source§impl Clone for LaunchTemplateData
impl Clone for LaunchTemplateData
Source§impl Debug for LaunchTemplateData
impl Debug for LaunchTemplateData
Source§impl Default for LaunchTemplateData
impl Default for LaunchTemplateData
Source§impl<'de> Deserialize<'de> for LaunchTemplateData
impl<'de> Deserialize<'de> for LaunchTemplateData
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 LaunchTemplateData
impl Message for LaunchTemplateData
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.