Class Instance (1.4.0)

public sealed class Instance : IMessage<Instance>, IEquatable<Instance>, IDeepCloneable<Instance>, IBufferMessage, IMessage

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

Inheritance

Object > Instance

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

Instance()

public Instance()

Instance(Instance)

public Instance(Instance other)
Parameter
NameDescription
otherInstance

Properties

AdvancedMachineFeatures

public AdvancedMachineFeatures AdvancedMachineFeatures { get; set; }

Controls for advanced machine-related behavior features.

Property Value
TypeDescription
AdvancedMachineFeatures

CanIpForward

public bool CanIpForward { get; set; }

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 .

Property Value
TypeDescription
Boolean

ConfidentialInstanceConfig

public ConfidentialInstanceConfig ConfidentialInstanceConfig { get; set; }
Property Value
TypeDescription
ConfidentialInstanceConfig

CpuPlatform

public string CpuPlatform { get; set; }

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

Property Value
TypeDescription
String

CreationTimestamp

public string CreationTimestamp { get; set; }

[Output Only] Creation timestamp in RFC3339 text format.

Property Value
TypeDescription
String

DeletionProtection

public bool DeletionProtection { get; set; }

Whether the resource should be protected against deletion.

Property Value
TypeDescription
Boolean

Description

public string Description { get; set; }

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

Property Value
TypeDescription
String

Disks

public RepeatedField<AttachedDisk> Disks { get; }

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

Property Value
TypeDescription
RepeatedField<AttachedDisk>

DisplayDevice

public DisplayDevice DisplayDevice { get; set; }

Enables display device for the instance.

Property Value
TypeDescription
DisplayDevice

Fingerprint

public string Fingerprint { get; set; }

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.

Property Value
TypeDescription
String

GuestAccelerators

public RepeatedField<AcceleratorConfig> GuestAccelerators { get; }

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

Property Value
TypeDescription
RepeatedField<AcceleratorConfig>

HasCanIpForward

public bool HasCanIpForward { get; }

Gets whether the "can_ip_forward" field is set

Property Value
TypeDescription
Boolean

HasCpuPlatform

public bool HasCpuPlatform { get; }

Gets whether the "cpu_platform" field is set

Property Value
TypeDescription
Boolean

HasCreationTimestamp

public bool HasCreationTimestamp { get; }

Gets whether the "creation_timestamp" field is set

Property Value
TypeDescription
Boolean

HasDeletionProtection

public bool HasDeletionProtection { get; }

Gets whether the "deletion_protection" field is set

Property Value
TypeDescription
Boolean

HasDescription

public bool HasDescription { get; }

Gets whether the "description" field is set

Property Value
TypeDescription
Boolean

HasFingerprint

public bool HasFingerprint { get; }

Gets whether the "fingerprint" field is set

Property Value
TypeDescription
Boolean

HasHostname

public bool HasHostname { get; }

Gets whether the "hostname" field is set

Property Value
TypeDescription
Boolean

HasId

public bool HasId { get; }

Gets whether the "id" field is set

Property Value
TypeDescription
Boolean

HasKind

public bool HasKind { get; }

Gets whether the "kind" field is set

Property Value
TypeDescription
Boolean

HasLabelFingerprint

public bool HasLabelFingerprint { get; }

Gets whether the "label_fingerprint" field is set

Property Value
TypeDescription
Boolean

HasLastStartTimestamp

public bool HasLastStartTimestamp { get; }

Gets whether the "last_start_timestamp" field is set

Property Value
TypeDescription
Boolean

HasLastStopTimestamp

public bool HasLastStopTimestamp { get; }

Gets whether the "last_stop_timestamp" field is set

Property Value
TypeDescription
Boolean

HasLastSuspendedTimestamp

public bool HasLastSuspendedTimestamp { get; }

Gets whether the "last_suspended_timestamp" field is set

Property Value
TypeDescription
Boolean

HasMachineType

public bool HasMachineType { get; }

Gets whether the "machine_type" field is set

Property Value
TypeDescription
Boolean

HasMinCpuPlatform

public bool HasMinCpuPlatform { get; }

Gets whether the "min_cpu_platform" field is set

Property Value
TypeDescription
Boolean

HasName

public bool HasName { get; }

Gets whether the "name" field is set

Property Value
TypeDescription
Boolean

HasPrivateIpv6GoogleAccess

public bool HasPrivateIpv6GoogleAccess { get; }

Gets whether the "private_ipv6_google_access" field is set

Property Value
TypeDescription
Boolean

HasSatisfiesPzs

public bool HasSatisfiesPzs { get; }

Gets whether the "satisfies_pzs" field is set

Property Value
TypeDescription
Boolean
public bool HasSelfLink { get; }

Gets whether the "self_link" field is set

Property Value
TypeDescription
Boolean

HasSourceMachineImage

public bool HasSourceMachineImage { get; }

Gets whether the "source_machine_image" field is set

Property Value
TypeDescription
Boolean

HasStartRestricted

public bool HasStartRestricted { get; }

Gets whether the "start_restricted" field is set

Property Value
TypeDescription
Boolean

HasStatus

public bool HasStatus { get; }

Gets whether the "status" field is set

Property Value
TypeDescription
Boolean

HasStatusMessage

public bool HasStatusMessage { get; }

Gets whether the "status_message" field is set

Property Value
TypeDescription
Boolean

HasZone

public bool HasZone { get; }

Gets whether the "zone" field is set

Property Value
TypeDescription
Boolean

Hostname

public string Hostname { get; set; }

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.

Property Value
TypeDescription
String

Id

public ulong Id { get; set; }

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

Property Value
TypeDescription
UInt64

Kind

public string Kind { get; set; }

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

Property Value
TypeDescription
String

LabelFingerprint

public string LabelFingerprint { get; set; }

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.

Property Value
TypeDescription
String

Labels

public MapField<string, string> Labels { get; }

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

Property Value
TypeDescription
MapField<String, String>

LastStartTimestamp

public string LastStartTimestamp { get; set; }

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

Property Value
TypeDescription
String

LastStopTimestamp

public string LastStopTimestamp { get; set; }

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

Property Value
TypeDescription
String

LastSuspendedTimestamp

public string LastSuspendedTimestamp { get; set; }

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

Property Value
TypeDescription
String

MachineType

public string MachineType { get; set; }

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.

Property Value
TypeDescription
String

Metadata

public Metadata Metadata { get; set; }

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

Property Value
TypeDescription
Metadata

MinCpuPlatform

public string MinCpuPlatform { get; set; }

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".

Property Value
TypeDescription
String

Name

public string Name { get; set; }

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.

Property Value
TypeDescription
String

NetworkInterfaces

public RepeatedField<NetworkInterface> NetworkInterfaces { get; }

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.

Property Value
TypeDescription
RepeatedField<NetworkInterface>

NetworkPerformanceConfig

public NetworkPerformanceConfig NetworkPerformanceConfig { get; set; }
Property Value
TypeDescription
NetworkPerformanceConfig

Params

public InstanceParams Params { get; set; }

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

Property Value
TypeDescription
InstanceParams

PrivateIpv6GoogleAccess

public string PrivateIpv6GoogleAccess { get; set; }

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.

Property Value
TypeDescription
String

ReservationAffinity

public ReservationAffinity ReservationAffinity { get; set; }

Specifies the reservations that this instance can consume from.

Property Value
TypeDescription
ReservationAffinity

ResourcePolicies

public RepeatedField<string> ResourcePolicies { get; }

Resource policies applied to this instance.

Property Value
TypeDescription
RepeatedField<String>

SatisfiesPzs

public bool SatisfiesPzs { get; set; }

[Output Only] Reserved for future use.

Property Value
TypeDescription
Boolean

Scheduling

public Scheduling Scheduling { get; set; }

Sets the scheduling options for this instance.

Property Value
TypeDescription
Scheduling
public string SelfLink { get; set; }

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

Property Value
TypeDescription
String

ServiceAccounts

public RepeatedField<ServiceAccount> ServiceAccounts { get; }

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.

Property Value
TypeDescription
RepeatedField<ServiceAccount>

ShieldedInstanceConfig

public ShieldedInstanceConfig ShieldedInstanceConfig { get; set; }
Property Value
TypeDescription
ShieldedInstanceConfig

ShieldedInstanceIntegrityPolicy

public ShieldedInstanceIntegrityPolicy ShieldedInstanceIntegrityPolicy { get; set; }
Property Value
TypeDescription
ShieldedInstanceIntegrityPolicy

SourceMachineImage

public string SourceMachineImage { get; set; }

Source machine image

Property Value
TypeDescription
String

SourceMachineImageEncryptionKey

public CustomerEncryptionKey SourceMachineImageEncryptionKey { get; set; }

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

Property Value
TypeDescription
CustomerEncryptionKey

StartRestricted

public bool StartRestricted { get; set; }

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

Property Value
TypeDescription
Boolean

Status

public string Status { get; set; }

[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.

Property Value
TypeDescription
String

StatusMessage

public string StatusMessage { get; set; }

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

Property Value
TypeDescription
String

Tags

public Tags Tags { get; set; }

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.

Property Value
TypeDescription
Tags

Zone

public string Zone { get; set; }

[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.

Property Value
TypeDescription
String