Class Instance
Represents an Instance resource. An instance is a virtual machine that is hosted on Google Cloud Platform. For
more information, read Virtual Machine Instances.
Assembly: Google.Apis.Compute.v1.dll
Syntax
public class Instance : IDirectResponseSchema
Properties
AdvancedMachineFeatures
Controls for advanced machine-related behavior features.
Declaration
[JsonProperty("advancedMachineFeatures")]
public virtual AdvancedMachineFeatures AdvancedMachineFeatures { get; set; }
Property Value
CanIpForward
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 .
Declaration
[JsonProperty("canIpForward")]
public virtual bool? CanIpForward { get; set; }
Property Value
ConfidentialInstanceConfig
Declaration
[JsonProperty("confidentialInstanceConfig")]
public virtual ConfidentialInstanceConfig ConfidentialInstanceConfig { get; set; }
Property Value
[Output Only] The CPU platform used by this instance.
Declaration
[JsonProperty("cpuPlatform")]
public virtual string CpuPlatform { get; set; }
Property Value
CreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Declaration
[JsonProperty("creationTimestamp")]
public virtual string CreationTimestamp { get; set; }
Property Value
DeletionProtection
Whether the resource should be protected against deletion.
Declaration
[JsonProperty("deletionProtection")]
public virtual bool? DeletionProtection { get; set; }
Property Value
Description
An optional description of this resource. Provide this property when you create the resource.
Declaration
[JsonProperty("description")]
public virtual string Description { get; set; }
Property Value
Disks
Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Declaration
[JsonProperty("disks")]
public virtual IList<AttachedDisk> Disks { get; set; }
Property Value
DisplayDevice
Enables display device for the instance.
Declaration
[JsonProperty("displayDevice")]
public virtual DisplayDevice DisplayDevice { get; set; }
Property Value
ETag
Declaration
public virtual string ETag { get; set; }
Property Value
Fingerprint
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.
Declaration
[JsonProperty("fingerprint")]
public virtual string Fingerprint { get; set; }
Property Value
GuestAccelerators
A list of the type and count of accelerator cards attached to the instance.
Declaration
[JsonProperty("guestAccelerators")]
public virtual IList<AcceleratorConfig> GuestAccelerators { get; set; }
Property Value
Hostname
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.
Declaration
[JsonProperty("hostname")]
public virtual string Hostname { get; set; }
Property Value
Id
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
Declaration
[JsonProperty("id")]
public virtual ulong? Id { get; set; }
Property Value
InstanceEncryptionKey
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.
Declaration
[JsonProperty("instanceEncryptionKey")]
public virtual CustomerEncryptionKey InstanceEncryptionKey { get; set; }
Property Value
KeyRevocationActionType
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is
"NONE" if it is not specified.
Declaration
[JsonProperty("keyRevocationActionType")]
public virtual string KeyRevocationActionType { get; set; }
Property Value
Kind
[Output Only] Type of the resource. Always compute#instance for instances.
Declaration
[JsonProperty("kind")]
public virtual string Kind { get; set; }
Property Value
LabelFingerprint
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.
Declaration
[JsonProperty("labelFingerprint")]
public virtual string LabelFingerprint { get; set; }
Property Value
Labels
Labels to apply to this instance. These can be later modified by the setLabels method.
Declaration
[JsonProperty("labels")]
public virtual IDictionary<string, string> Labels { get; set; }
Property Value
LastStartTimestamp
[Output Only] Last start timestamp in RFC3339 text format.
Declaration
[JsonProperty("lastStartTimestamp")]
public virtual string LastStartTimestamp { get; set; }
Property Value
LastStopTimestamp
[Output Only] Last stop timestamp in RFC3339 text format.
Declaration
[JsonProperty("lastStopTimestamp")]
public virtual string LastStopTimestamp { get; set; }
Property Value
LastSuspendedTimestamp
[Output Only] Last suspended timestamp in RFC3339 text format.
Declaration
[JsonProperty("lastSuspendedTimestamp")]
public virtual string LastSuspendedTimestamp { get; set; }
Property Value
MachineType
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.
Declaration
[JsonProperty("machineType")]
public virtual string MachineType { get; set; }
Property Value
The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
Declaration
[JsonProperty("metadata")]
public virtual Metadata Metadata { get; set; }
Property Value
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".
Declaration
[JsonProperty("minCpuPlatform")]
public virtual string MinCpuPlatform { get; set; }
Property Value
Name
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.
Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
NetworkInterfaces
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.
Declaration
[JsonProperty("networkInterfaces")]
public virtual IList<NetworkInterface> NetworkInterfaces { get; set; }
Property Value
Declaration
[JsonProperty("networkPerformanceConfig")]
public virtual NetworkPerformanceConfig NetworkPerformanceConfig { get; set; }
Property Value
Params__
Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource
payload.
Declaration
[JsonProperty("params")]
public virtual InstanceParams Params__ { get; set; }
Property Value
PrivateIpv6GoogleAccess
The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
Declaration
[JsonProperty("privateIpv6GoogleAccess")]
public virtual string PrivateIpv6GoogleAccess { get; set; }
Property Value
ReservationAffinity
Specifies the reservations that this instance can consume from.
Declaration
[JsonProperty("reservationAffinity")]
public virtual ReservationAffinity ReservationAffinity { get; set; }
Property Value
ResourcePolicies
Resource policies applied to this instance.
Declaration
[JsonProperty("resourcePolicies")]
public virtual IList<string> ResourcePolicies { get; set; }
Property Value
ResourceStatus
[Output Only] Specifies values set for instance attributes as compared to the values requested by user in
the corresponding input only field.
Declaration
[JsonProperty("resourceStatus")]
public virtual ResourceStatus ResourceStatus { get; set; }
Property Value
SatisfiesPzi
[Output Only] Reserved for future use.
Declaration
[JsonProperty("satisfiesPzi")]
public virtual bool? SatisfiesPzi { get; set; }
Property Value
SatisfiesPzs
[Output Only] Reserved for future use.
Declaration
[JsonProperty("satisfiesPzs")]
public virtual bool? SatisfiesPzs { get; set; }
Property Value
Scheduling
Sets the scheduling options for this instance.
Declaration
[JsonProperty("scheduling")]
public virtual Scheduling Scheduling { get; set; }
Property Value
SelfLink
[Output Only] Server-defined URL for this resource.
Declaration
[JsonProperty("selfLink")]
public virtual string SelfLink { get; set; }
Property Value
ServiceAccounts
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.
Declaration
[JsonProperty("serviceAccounts")]
public virtual IList<ServiceAccount> ServiceAccounts { get; set; }
Property Value
ShieldedInstanceConfig
Declaration
[JsonProperty("shieldedInstanceConfig")]
public virtual ShieldedInstanceConfig ShieldedInstanceConfig { get; set; }
Property Value
ShieldedInstanceIntegrityPolicy
Declaration
[JsonProperty("shieldedInstanceIntegrityPolicy")]
public virtual ShieldedInstanceIntegrityPolicy ShieldedInstanceIntegrityPolicy { get; set; }
Property Value
SourceMachineImage
Declaration
[JsonProperty("sourceMachineImage")]
public virtual string SourceMachineImage { get; set; }
Property Value
SourceMachineImageEncryptionKey
Source machine image encryption key when creating an instance from a machine image.
Declaration
[JsonProperty("sourceMachineImageEncryptionKey")]
public virtual CustomerEncryptionKey SourceMachineImageEncryptionKey { get; set; }
Property Value
StartRestricted
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious
activity.
Declaration
[JsonProperty("startRestricted")]
public virtual bool? StartRestricted { get; set; }
Property Value
Status
[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.
Declaration
[JsonProperty("status")]
public virtual string Status { get; set; }
Property Value
StatusMessage
[Output Only] An optional, human-readable explanation of the status.
Declaration
[JsonProperty("statusMessage")]
public virtual string StatusMessage { get; set; }
Property Value
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.
Declaration
[JsonProperty("tags")]
public virtual Tags Tags { get; set; }
Property Value
Zone
[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.
Declaration
[JsonProperty("zone")]
public virtual string Zone { get; set; }
Property Value
Implements