#[non_exhaustive]pub struct InstanceProperties {Show 21 fields
pub advanced_machine_features: Option<AdvancedMachineFeatures>,
pub can_ip_forward: Option<bool>,
pub confidential_instance_config: Option<ConfidentialInstanceConfig>,
pub description: Option<String>,
pub disks: Vec<AttachedDisk>,
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 network_performance_config: Option<NetworkPerformanceConfig>,
pub private_ipv_6_google_access: Option<PrivateIpv6GoogleAccess>,
pub reservation_affinity: Option<ReservationAffinity>,
pub resource_manager_tags: HashMap<String, String>,
pub resource_policies: Vec<String>,
pub scheduling: Option<Scheduling>,
pub service_accounts: Vec<ServiceAccount>,
pub shielded_instance_config: Option<ShieldedInstanceConfig>,
pub tags: Option<Tags>,
/* private fields */
}instance-templates or instances or machine-images or region-instance-templates or region-instances only.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.advanced_machine_features: Option<AdvancedMachineFeatures>Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.
can_ip_forward: Option<bool>Enables instances created based on these properties 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.
confidential_instance_config: Option<ConfidentialInstanceConfig>Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.
description: Option<String>An optional text description for the instances that are created from these properties.
disks: Vec<AttachedDisk>An array of disks that are associated with the instances that are created from these properties.
guest_accelerators: Vec<AcceleratorConfig>A list of guest accelerator cards’ type and count to use for instances created from these properties.
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 these properties.
machine_type: Option<String>The machine type to use for instances that are created from these
properties.
This field only accepts a machine type name, for example n2-standard-4.
If you use the machine type full or partial URL, for example
projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4,
the request will result in an INTERNAL_ERROR.
metadata: Option<Metadata>The metadata key/value pairs to assign to instances that are created from these properties. 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. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such asminCpuPlatform: “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.
network_performance_config: Option<NetworkPerformanceConfig>Note that for MachineImage, this is not supported yet.
private_ipv_6_google_access: Option<PrivateIpv6GoogleAccess>The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet.
reservation_affinity: Option<ReservationAffinity>Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.
Resource manager tags to be bound to the instance. Tag keys and values
have the same definition as resource
manager tags. Keys must be in the format tagKeys/{tag_key_id}, and
values are in the format tagValues/456. The field is ignored (both PUT &
PATCH) when empty.
resource_policies: Vec<String>Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.
scheduling: Option<Scheduling>Specifies the scheduling options for the instances that are created from these properties.
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 these properties. Use metadata queries to obtain the access tokens for these instances.
shielded_instance_config: Option<ShieldedInstanceConfig>Note that for MachineImage, this is not supported yet.
A list of tags to apply to the instances that are created from these properties. 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 with RFC1035.
Implementations§
Source§impl InstanceProperties
impl InstanceProperties
pub fn new() -> Self
Sourcepub fn set_advanced_machine_features<T>(self, v: T) -> Selfwhere
T: Into<AdvancedMachineFeatures>,
pub fn set_advanced_machine_features<T>(self, v: T) -> Selfwhere
T: Into<AdvancedMachineFeatures>,
Sets the value of advanced_machine_features.
§Example
use google_cloud_compute_v1::model::AdvancedMachineFeatures;
let x = InstanceProperties::new().set_advanced_machine_features(AdvancedMachineFeatures::default()/* use setters */);Sourcepub fn set_or_clear_advanced_machine_features<T>(self, v: Option<T>) -> Selfwhere
T: Into<AdvancedMachineFeatures>,
pub fn set_or_clear_advanced_machine_features<T>(self, v: Option<T>) -> Selfwhere
T: Into<AdvancedMachineFeatures>,
Sets or clears the value of advanced_machine_features.
§Example
use google_cloud_compute_v1::model::AdvancedMachineFeatures;
let x = InstanceProperties::new().set_or_clear_advanced_machine_features(Some(AdvancedMachineFeatures::default()/* use setters */));
let x = InstanceProperties::new().set_or_clear_advanced_machine_features(None::<AdvancedMachineFeatures>);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 = InstanceProperties::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 = InstanceProperties::new().set_or_clear_can_ip_forward(Some(false));
let x = InstanceProperties::new().set_or_clear_can_ip_forward(None::<bool>);Sourcepub fn set_confidential_instance_config<T>(self, v: T) -> Selfwhere
T: Into<ConfidentialInstanceConfig>,
pub fn set_confidential_instance_config<T>(self, v: T) -> Selfwhere
T: Into<ConfidentialInstanceConfig>,
Sets the value of confidential_instance_config.
§Example
use google_cloud_compute_v1::model::ConfidentialInstanceConfig;
let x = InstanceProperties::new().set_confidential_instance_config(ConfidentialInstanceConfig::default()/* use setters */);Sourcepub fn set_or_clear_confidential_instance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConfidentialInstanceConfig>,
pub fn set_or_clear_confidential_instance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConfidentialInstanceConfig>,
Sets or clears the value of confidential_instance_config.
§Example
use google_cloud_compute_v1::model::ConfidentialInstanceConfig;
let x = InstanceProperties::new().set_or_clear_confidential_instance_config(Some(ConfidentialInstanceConfig::default()/* use setters */));
let x = InstanceProperties::new().set_or_clear_confidential_instance_config(None::<ConfidentialInstanceConfig>);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 = InstanceProperties::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 = InstanceProperties::new().set_or_clear_description(Some("example"));
let x = InstanceProperties::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 = InstanceProperties::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::instance_properties::KeyRevocationActionType;
let x0 = InstanceProperties::new().set_key_revocation_action_type(KeyRevocationActionType::None);
let x1 = InstanceProperties::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::instance_properties::KeyRevocationActionType;
let x0 = InstanceProperties::new().set_or_clear_key_revocation_action_type(Some(KeyRevocationActionType::None));
let x1 = InstanceProperties::new().set_or_clear_key_revocation_action_type(Some(KeyRevocationActionType::Stop));
let x_none = InstanceProperties::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 = InstanceProperties::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 = InstanceProperties::new().set_or_clear_machine_type(Some("example"));
let x = InstanceProperties::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 = InstanceProperties::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 = InstanceProperties::new().set_or_clear_min_cpu_platform(Some("example"));
let x = InstanceProperties::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 = InstanceProperties::new()
.set_network_interfaces([
NetworkInterface::default()/* use setters */,
NetworkInterface::default()/* use (different) setters */,
]);Sourcepub fn set_network_performance_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkPerformanceConfig>,
pub fn set_network_performance_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkPerformanceConfig>,
Sets the value of network_performance_config.
§Example
use google_cloud_compute_v1::model::NetworkPerformanceConfig;
let x = InstanceProperties::new().set_network_performance_config(NetworkPerformanceConfig::default()/* use setters */);Sourcepub fn set_or_clear_network_performance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkPerformanceConfig>,
pub fn set_or_clear_network_performance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkPerformanceConfig>,
Sets or clears the value of network_performance_config.
§Example
use google_cloud_compute_v1::model::NetworkPerformanceConfig;
let x = InstanceProperties::new().set_or_clear_network_performance_config(Some(NetworkPerformanceConfig::default()/* use setters */));
let x = InstanceProperties::new().set_or_clear_network_performance_config(None::<NetworkPerformanceConfig>);Sourcepub fn set_private_ipv_6_google_access<T>(self, v: T) -> Selfwhere
T: Into<PrivateIpv6GoogleAccess>,
pub fn set_private_ipv_6_google_access<T>(self, v: T) -> Selfwhere
T: Into<PrivateIpv6GoogleAccess>,
Sets the value of private_ipv_6_google_access.
§Example
use google_cloud_compute_v1::model::instance_properties::PrivateIpv6GoogleAccess;
let x0 = InstanceProperties::new().set_private_ipv_6_google_access(PrivateIpv6GoogleAccess::EnableOutboundVmAccessToGoogle);
let x1 = InstanceProperties::new().set_private_ipv_6_google_access(PrivateIpv6GoogleAccess::InheritFromSubnetwork);Sourcepub fn set_or_clear_private_ipv_6_google_access<T>(self, v: Option<T>) -> Selfwhere
T: Into<PrivateIpv6GoogleAccess>,
pub fn set_or_clear_private_ipv_6_google_access<T>(self, v: Option<T>) -> Selfwhere
T: Into<PrivateIpv6GoogleAccess>,
Sets or clears the value of private_ipv_6_google_access.
§Example
use google_cloud_compute_v1::model::instance_properties::PrivateIpv6GoogleAccess;
let x0 = InstanceProperties::new().set_or_clear_private_ipv_6_google_access(Some(PrivateIpv6GoogleAccess::EnableOutboundVmAccessToGoogle));
let x1 = InstanceProperties::new().set_or_clear_private_ipv_6_google_access(Some(PrivateIpv6GoogleAccess::InheritFromSubnetwork));
let x_none = InstanceProperties::new().set_or_clear_private_ipv_6_google_access(None::<PrivateIpv6GoogleAccess>);Sourcepub fn set_reservation_affinity<T>(self, v: T) -> Selfwhere
T: Into<ReservationAffinity>,
pub fn set_reservation_affinity<T>(self, v: T) -> Selfwhere
T: Into<ReservationAffinity>,
Sets the value of reservation_affinity.
§Example
use google_cloud_compute_v1::model::ReservationAffinity;
let x = InstanceProperties::new().set_reservation_affinity(ReservationAffinity::default()/* use setters */);Sourcepub fn set_or_clear_reservation_affinity<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReservationAffinity>,
pub fn set_or_clear_reservation_affinity<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReservationAffinity>,
Sets or clears the value of reservation_affinity.
§Example
use google_cloud_compute_v1::model::ReservationAffinity;
let x = InstanceProperties::new().set_or_clear_reservation_affinity(Some(ReservationAffinity::default()/* use setters */));
let x = InstanceProperties::new().set_or_clear_reservation_affinity(None::<ReservationAffinity>);Sets the value of resource_manager_tags.
§Example
let x = InstanceProperties::new().set_resource_manager_tags([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_resource_policies<T, V>(self, v: T) -> Self
pub fn set_resource_policies<T, V>(self, v: T) -> Self
Sets the value of resource_policies.
§Example
let x = InstanceProperties::new().set_resource_policies(["a", "b", "c"]);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 = InstanceProperties::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 = InstanceProperties::new().set_or_clear_scheduling(Some(Scheduling::default()/* use setters */));
let x = InstanceProperties::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 = InstanceProperties::new()
.set_service_accounts([
ServiceAccount::default()/* use setters */,
ServiceAccount::default()/* use (different) setters */,
]);Sourcepub fn set_shielded_instance_config<T>(self, v: T) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
pub fn set_shielded_instance_config<T>(self, v: T) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
Sets the value of shielded_instance_config.
§Example
use google_cloud_compute_v1::model::ShieldedInstanceConfig;
let x = InstanceProperties::new().set_shielded_instance_config(ShieldedInstanceConfig::default()/* use setters */);Sourcepub fn set_or_clear_shielded_instance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
pub fn set_or_clear_shielded_instance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
Sets or clears the value of shielded_instance_config.
§Example
use google_cloud_compute_v1::model::ShieldedInstanceConfig;
let x = InstanceProperties::new().set_or_clear_shielded_instance_config(Some(ShieldedInstanceConfig::default()/* use setters */));
let x = InstanceProperties::new().set_or_clear_shielded_instance_config(None::<ShieldedInstanceConfig>);Trait Implementations§
Source§impl Clone for InstanceProperties
impl Clone for InstanceProperties
Source§fn clone(&self) -> InstanceProperties
fn clone(&self) -> InstanceProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more