#[non_exhaustive]pub struct SourceInstanceProperties {Show 15 fields
pub can_ip_forward: Option<bool>,
pub deletion_protection: Option<bool>,
pub description: Option<String>,
pub disks: Vec<SavedAttachedDisk>,
pub guest_accelerators: Vec<AcceleratorConfig>,
pub key_revocation_action_type: Option<KeyRevocationActionType>,
pub labels: HashMap<String, String>,
pub machine_type: Option<String>,
pub metadata: Option<Metadata>,
pub min_cpu_platform: Option<String>,
pub network_interfaces: Vec<NetworkInterface>,
pub post_key_revocation_action_type: Option<PostKeyRevocationActionType>,
pub scheduling: Option<Scheduling>,
pub service_accounts: Vec<ServiceAccount>,
pub tags: Option<Tags>,
/* private fields */
}machine-images only.Expand description
DEPRECATED: Please use compute#instanceProperties instead. New properties will not be added to this field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.can_ip_forward: Option<bool>Enables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set tofalse. See theEnable IP forwarding documentation for more information.
deletion_protection: Option<bool>Whether the instance created from this machine image should be protected against deletion.
description: Option<String>An optional text description for the instances that are created from this machine image.
disks: Vec<SavedAttachedDisk>An array of disks that are associated with the instances that are created from this machine image.
guest_accelerators: Vec<AcceleratorConfig>A list of guest accelerator cards’ type and count to use for instances created from this machine image.
key_revocation_action_type: Option<KeyRevocationActionType>KeyRevocationActionType of the instance. Supported options are “STOP” and “NONE”. The default value is “NONE” if it is not specified.
labels: HashMap<String, String>Labels to apply to instances that are created from this machine image.
machine_type: Option<String>The machine type to use for instances that are created from this machine image.
metadata: Option<Metadata>The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. SeeProject and instance metadata for more information.
min_cpu_platform: Option<String>Minimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: “Intel Haswell” orminCpuPlatform: “Intel Sandy Bridge”. For more information, read Specifying a Minimum CPU Platform.
network_interfaces: Vec<NetworkInterface>An array of network access configurations for this interface.
post_key_revocation_action_type: Option<PostKeyRevocationActionType>PostKeyRevocationActionType of the instance.
scheduling: Option<Scheduling>Specifies the scheduling options for the instances that are created from this machine image.
service_accounts: Vec<ServiceAccount>A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.
A list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply withRFC1035.
Implementations§
Source§impl SourceInstanceProperties
impl SourceInstanceProperties
pub fn new() -> Self
Sourcepub fn set_can_ip_forward<T>(self, v: T) -> Self
pub fn set_can_ip_forward<T>(self, v: T) -> Self
Sets the value of can_ip_forward.
§Example
let x = SourceInstanceProperties::new().set_can_ip_forward(true);Sourcepub fn set_or_clear_can_ip_forward<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_can_ip_forward<T>(self, v: Option<T>) -> Self
Sets or clears the value of can_ip_forward.
§Example
let x = SourceInstanceProperties::new().set_or_clear_can_ip_forward(Some(false));
let x = SourceInstanceProperties::new().set_or_clear_can_ip_forward(None::<bool>);Sourcepub fn set_deletion_protection<T>(self, v: T) -> Self
pub fn set_deletion_protection<T>(self, v: T) -> Self
Sets the value of deletion_protection.
§Example
let x = SourceInstanceProperties::new().set_deletion_protection(true);Sourcepub fn set_or_clear_deletion_protection<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_deletion_protection<T>(self, v: Option<T>) -> Self
Sets or clears the value of deletion_protection.
§Example
let x = SourceInstanceProperties::new().set_or_clear_deletion_protection(Some(false));
let x = SourceInstanceProperties::new().set_or_clear_deletion_protection(None::<bool>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sets the value of description.
§Example
let x = SourceInstanceProperties::new().set_description("example");Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = SourceInstanceProperties::new().set_or_clear_description(Some("example"));
let x = SourceInstanceProperties::new().set_or_clear_description(None::<String>);Sourcepub fn set_guest_accelerators<T, V>(self, v: T) -> Self
pub fn set_guest_accelerators<T, V>(self, v: T) -> Self
Sets the value of guest_accelerators.
§Example
use google_cloud_compute_v1::model::AcceleratorConfig;
let x = SourceInstanceProperties::new()
.set_guest_accelerators([
AcceleratorConfig::default()/* use setters */,
AcceleratorConfig::default()/* use (different) setters */,
]);Sourcepub fn set_key_revocation_action_type<T>(self, v: T) -> Selfwhere
T: Into<KeyRevocationActionType>,
pub fn set_key_revocation_action_type<T>(self, v: T) -> Selfwhere
T: Into<KeyRevocationActionType>,
Sets the value of key_revocation_action_type.
§Example
use google_cloud_compute_v1::model::source_instance_properties::KeyRevocationActionType;
let x0 = SourceInstanceProperties::new().set_key_revocation_action_type(KeyRevocationActionType::None);
let x1 = SourceInstanceProperties::new().set_key_revocation_action_type(KeyRevocationActionType::Stop);Sourcepub fn set_or_clear_key_revocation_action_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<KeyRevocationActionType>,
pub fn set_or_clear_key_revocation_action_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<KeyRevocationActionType>,
Sets or clears the value of key_revocation_action_type.
§Example
use google_cloud_compute_v1::model::source_instance_properties::KeyRevocationActionType;
let x0 = SourceInstanceProperties::new().set_or_clear_key_revocation_action_type(Some(KeyRevocationActionType::None));
let x1 = SourceInstanceProperties::new().set_or_clear_key_revocation_action_type(Some(KeyRevocationActionType::Stop));
let x_none = SourceInstanceProperties::new().set_or_clear_key_revocation_action_type(None::<KeyRevocationActionType>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_machine_type<T>(self, v: T) -> Self
pub fn set_machine_type<T>(self, v: T) -> Self
Sets the value of machine_type.
§Example
let x = SourceInstanceProperties::new().set_machine_type("example");Sourcepub fn set_or_clear_machine_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_machine_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of machine_type.
§Example
let x = SourceInstanceProperties::new().set_or_clear_machine_type(Some("example"));
let x = SourceInstanceProperties::new().set_or_clear_machine_type(None::<String>);Sourcepub fn set_metadata<T>(self, v: T) -> Self
pub fn set_metadata<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Self
Sourcepub fn set_min_cpu_platform<T>(self, v: T) -> Self
pub fn set_min_cpu_platform<T>(self, v: T) -> Self
Sets the value of min_cpu_platform.
§Example
let x = SourceInstanceProperties::new().set_min_cpu_platform("example");Sourcepub fn set_or_clear_min_cpu_platform<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_min_cpu_platform<T>(self, v: Option<T>) -> Self
Sets or clears the value of min_cpu_platform.
§Example
let x = SourceInstanceProperties::new().set_or_clear_min_cpu_platform(Some("example"));
let x = SourceInstanceProperties::new().set_or_clear_min_cpu_platform(None::<String>);Sourcepub fn set_network_interfaces<T, V>(self, v: T) -> Self
pub fn set_network_interfaces<T, V>(self, v: T) -> Self
Sets the value of network_interfaces.
§Example
use google_cloud_compute_v1::model::NetworkInterface;
let x = SourceInstanceProperties::new()
.set_network_interfaces([
NetworkInterface::default()/* use setters */,
NetworkInterface::default()/* use (different) setters */,
]);Sourcepub fn set_post_key_revocation_action_type<T>(self, v: T) -> Selfwhere
T: Into<PostKeyRevocationActionType>,
pub fn set_post_key_revocation_action_type<T>(self, v: T) -> Selfwhere
T: Into<PostKeyRevocationActionType>,
Sets the value of post_key_revocation_action_type.
§Example
use google_cloud_compute_v1::model::source_instance_properties::PostKeyRevocationActionType;
let x0 = SourceInstanceProperties::new().set_post_key_revocation_action_type(PostKeyRevocationActionType::Unspecified);
let x1 = SourceInstanceProperties::new().set_post_key_revocation_action_type(PostKeyRevocationActionType::Shutdown);Sourcepub fn set_or_clear_post_key_revocation_action_type<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<PostKeyRevocationActionType>,
pub fn set_or_clear_post_key_revocation_action_type<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<PostKeyRevocationActionType>,
Sets or clears the value of post_key_revocation_action_type.
§Example
use google_cloud_compute_v1::model::source_instance_properties::PostKeyRevocationActionType;
let x0 = SourceInstanceProperties::new().set_or_clear_post_key_revocation_action_type(Some(PostKeyRevocationActionType::Unspecified));
let x1 = SourceInstanceProperties::new().set_or_clear_post_key_revocation_action_type(Some(PostKeyRevocationActionType::Shutdown));
let x_none = SourceInstanceProperties::new().set_or_clear_post_key_revocation_action_type(None::<PostKeyRevocationActionType>);Sourcepub fn set_scheduling<T>(self, v: T) -> Selfwhere
T: Into<Scheduling>,
pub fn set_scheduling<T>(self, v: T) -> Selfwhere
T: Into<Scheduling>,
Sets the value of scheduling.
§Example
use google_cloud_compute_v1::model::Scheduling;
let x = SourceInstanceProperties::new().set_scheduling(Scheduling::default()/* use setters */);Sourcepub fn set_or_clear_scheduling<T>(self, v: Option<T>) -> Selfwhere
T: Into<Scheduling>,
pub fn set_or_clear_scheduling<T>(self, v: Option<T>) -> Selfwhere
T: Into<Scheduling>,
Sets or clears the value of scheduling.
§Example
use google_cloud_compute_v1::model::Scheduling;
let x = SourceInstanceProperties::new().set_or_clear_scheduling(Some(Scheduling::default()/* use setters */));
let x = SourceInstanceProperties::new().set_or_clear_scheduling(None::<Scheduling>);Sourcepub fn set_service_accounts<T, V>(self, v: T) -> Self
pub fn set_service_accounts<T, V>(self, v: T) -> Self
Sets the value of service_accounts.
§Example
use google_cloud_compute_v1::model::ServiceAccount;
let x = SourceInstanceProperties::new()
.set_service_accounts([
ServiceAccount::default()/* use setters */,
ServiceAccount::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for SourceInstanceProperties
impl Clone for SourceInstanceProperties
Source§fn clone(&self) -> SourceInstanceProperties
fn clone(&self) -> SourceInstanceProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more