Struct google_api_proto::google::cloud::compute::v1::Instance

source ·
pub struct Instance {
Show 46 fields pub advanced_machine_features: Option<AdvancedMachineFeatures>, pub can_ip_forward: Option<bool>, pub confidential_instance_config: Option<ConfidentialInstanceConfig>, pub cpu_platform: Option<String>, pub creation_timestamp: Option<String>, pub deletion_protection: Option<bool>, pub description: Option<String>, pub disks: Vec<AttachedDisk>, pub display_device: Option<DisplayDevice>, pub fingerprint: Option<String>, pub guest_accelerators: Vec<AcceleratorConfig>, pub hostname: Option<String>, pub id: Option<u64>, pub instance_encryption_key: Option<CustomerEncryptionKey>, pub key_revocation_action_type: Option<String>, pub kind: Option<String>, pub label_fingerprint: Option<String>, pub labels: BTreeMap<String, String>, pub last_start_timestamp: Option<String>, pub last_stop_timestamp: Option<String>, pub last_suspended_timestamp: Option<String>, pub machine_type: Option<String>, pub metadata: Option<Metadata>, pub min_cpu_platform: Option<String>, pub name: Option<String>, pub network_interfaces: Vec<NetworkInterface>, pub network_performance_config: Option<NetworkPerformanceConfig>, pub params: Option<InstanceParams>, pub private_ipv6_google_access: Option<String>, pub reservation_affinity: Option<ReservationAffinity>, pub resource_policies: Vec<String>, pub resource_status: Option<ResourceStatus>, pub satisfies_pzi: Option<bool>, pub satisfies_pzs: Option<bool>, pub scheduling: Option<Scheduling>, pub self_link: Option<String>, pub service_accounts: Vec<ServiceAccount>, pub shielded_instance_config: Option<ShieldedInstanceConfig>, pub shielded_instance_integrity_policy: Option<ShieldedInstanceIntegrityPolicy>, pub source_machine_image: Option<String>, pub source_machine_image_encryption_key: Option<CustomerEncryptionKey>, pub start_restricted: Option<bool>, pub status: Option<String>, pub status_message: Option<String>, pub tags: Option<Tags>, pub zone: Option<String>,
}
Expand description

Represents an Instance resource. An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances.

Fields§

§advanced_machine_features: Option<AdvancedMachineFeatures>

Controls for advanced machine-related behavior features.

§can_ip_forward: Option<bool>

Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding .

§confidential_instance_config: Option<ConfidentialInstanceConfig>§cpu_platform: Option<String>

[Output Only] The CPU platform used by this instance.

§creation_timestamp: Option<String>

[Output Only] Creation timestamp in RFC3339 text format.

§deletion_protection: Option<bool>

Whether the resource should be protected against deletion.

§description: Option<String>

An optional description of this resource. Provide this property when you create the resource.

§disks: Vec<AttachedDisk>

Array of disks associated with this instance. Persistent disks must be created before you can assign them.

§display_device: Option<DisplayDevice>

Enables display device for the instance.

§fingerprint: Option<String>

Specifies a fingerprint for this resource, which is essentially a hash of the instance’s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance.

§guest_accelerators: Vec<AcceleratorConfig>

A list of the type and count of accelerator cards attached to the instance.

§hostname: Option<String>

Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.

§id: Option<u64>

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

§instance_encryption_key: Option<CustomerEncryptionKey>

Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.

§key_revocation_action_type: Option<String>

KeyRevocationActionType of the instance. Supported options are “STOP” and “NONE”. The default value is “NONE” if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

§kind: Option<String>

[Output Only] Type of the resource. Always compute#instance for instances.

§label_fingerprint: Option<String>

A fingerprint for this request, which is essentially a hash of the label’s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance.

§labels: BTreeMap<String, String>

Labels to apply to this instance. These can be later modified by the setLabels method.

§last_start_timestamp: Option<String>

[Output Only] Last start timestamp in RFC3339 text format.

§last_stop_timestamp: Option<String>

[Output Only] Last stop timestamp in RFC3339 text format.

§last_suspended_timestamp: Option<String>

[Output Only] Last suspended timestamp in RFC3339 text format.

§machine_type: Option<String>

Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, … 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types.

§metadata: Option<Metadata>

The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.

§min_cpu_platform: Option<String>

Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: “Intel Haswell” or minCpuPlatform: “Intel Sandy Bridge”.

§name: Option<String>

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z](\[-a-z0-9\]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

§network_interfaces: Vec<NetworkInterface>

An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.

§network_performance_config: Option<NetworkPerformanceConfig>§params: Option<InstanceParams>

Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.

§private_ipv6_google_access: Option<String>

The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

§reservation_affinity: Option<ReservationAffinity>

Specifies the reservations that this instance can consume from.

§resource_policies: Vec<String>

Resource policies applied to this instance.

§resource_status: Option<ResourceStatus>

[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field.

§satisfies_pzi: Option<bool>

[Output Only] Reserved for future use.

§satisfies_pzs: Option<bool>

[Output Only] Reserved for future use.

§scheduling: Option<Scheduling>

Sets the scheduling options for this instance.

§self_link: Option<String>

[Output Only] Server-defined URL for this resource.

§service_accounts: Vec<ServiceAccount>

A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.

§shielded_instance_config: Option<ShieldedInstanceConfig>§shielded_instance_integrity_policy: Option<ShieldedInstanceIntegrityPolicy>§source_machine_image: Option<String>

Source machine image

§source_machine_image_encryption_key: Option<CustomerEncryptionKey>

Source machine image encryption key when creating an instance from a machine image.

§start_restricted: Option<bool>

[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.

§status: Option<String>

[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle. Check the Status enum for the list of possible values.

§status_message: Option<String>

[Output Only] An optional, human-readable explanation of the status.

§tags: Option<Tags>

Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the ‘tags.items’ field.

§zone: Option<String>

[Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

Implementations§

source§

impl Instance

source

pub fn id(&self) -> u64

Returns the value of id, or the default value if id is unset.

source

pub fn kind(&self) -> &str

Returns the value of kind, or the default value if kind is unset.

source

pub fn name(&self) -> &str

Returns the value of name, or the default value if name is unset.

source

pub fn zone(&self) -> &str

Returns the value of zone, or the default value if zone is unset.

source

pub fn source_machine_image(&self) -> &str

Returns the value of source_machine_image, or the default value if source_machine_image is unset.

source

pub fn creation_timestamp(&self) -> &str

Returns the value of creation_timestamp, or the default value if creation_timestamp is unset.

source

pub fn private_ipv6_google_access(&self) -> &str

Returns the value of private_ipv6_google_access, or the default value if private_ipv6_google_access is unset.

source

pub fn start_restricted(&self) -> bool

Returns the value of start_restricted, or the default value if start_restricted is unset.

source

pub fn label_fingerprint(&self) -> &str

Returns the value of label_fingerprint, or the default value if label_fingerprint is unset.

source

pub fn status(&self) -> &str

Returns the value of status, or the default value if status is unset.

source

pub fn machine_type(&self) -> &str

Returns the value of machine_type, or the default value if machine_type is unset.

source

pub fn fingerprint(&self) -> &str

Returns the value of fingerprint, or the default value if fingerprint is unset.

source

pub fn key_revocation_action_type(&self) -> &str

Returns the value of key_revocation_action_type, or the default value if key_revocation_action_type is unset.

source

pub fn hostname(&self) -> &str

Returns the value of hostname, or the default value if hostname is unset.

source

pub fn min_cpu_platform(&self) -> &str

Returns the value of min_cpu_platform, or the default value if min_cpu_platform is unset.

source

pub fn status_message(&self) -> &str

Returns the value of status_message, or the default value if status_message is unset.

source

pub fn last_suspended_timestamp(&self) -> &str

Returns the value of last_suspended_timestamp, or the default value if last_suspended_timestamp is unset.

source

pub fn cpu_platform(&self) -> &str

Returns the value of cpu_platform, or the default value if cpu_platform is unset.

source

pub fn last_stop_timestamp(&self) -> &str

Returns the value of last_stop_timestamp, or the default value if last_stop_timestamp is unset.

source

pub fn description(&self) -> &str

Returns the value of description, or the default value if description is unset.

source

pub fn last_start_timestamp(&self) -> &str

Returns the value of last_start_timestamp, or the default value if last_start_timestamp is unset.

Returns the value of self_link, or the default value if self_link is unset.

source

pub fn deletion_protection(&self) -> bool

Returns the value of deletion_protection, or the default value if deletion_protection is unset.

source

pub fn can_ip_forward(&self) -> bool

Returns the value of can_ip_forward, or the default value if can_ip_forward is unset.

source

pub fn satisfies_pzi(&self) -> bool

Returns the value of satisfies_pzi, or the default value if satisfies_pzi is unset.

source

pub fn satisfies_pzs(&self) -> bool

Returns the value of satisfies_pzs, or the default value if satisfies_pzs is unset.

Trait Implementations§

source§

impl Clone for Instance

source§

fn clone(&self) -> Instance

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Instance

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Instance

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for Instance

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Instance

source§

fn eq(&self, other: &Instance) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Instance

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more