Instance class

Represents an Instance resource.

An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)

Constructors

Instance()
Instance.fromJson(Map _json)

Properties

canIpForward 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.
read / write
cpuPlatform String
Output Only The CPU platform used by this instance.
read / write
creationTimestamp String
Output Only Creation timestamp in RFC3339 text format.
read / write
deletionProtection bool
Whether the resource should be protected against deletion.
read / write
description String
An optional description of this resource. Provide this property when you create the resource.
read / write
disks List<AttachedDisk>
Array of disks associated with this instance. Persistent disks must be created before you can assign them.
read / write
displayDevice DisplayDevice
Enables display device for the instance.
read / write
fingerprint 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. [...]
read / write
fingerprintAsBytes List<int>
read / write
guestAccelerators List<AcceleratorConfig>
A list of the type and count of accelerator cards attached to the instance.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
hostname 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.
read / write
id String
Output Only The unique identifier for the resource. This identifier is defined by the server.
read / write
kind String
Output Only Type of the resource. Always compute#instance for instances.
read / write
labelFingerprint 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. [...]
read / write
labelFingerprintAsBytes List<int>
read / write
labels Map<String, String>
Labels to apply to this instance. These can be later modified by the setLabels method.
read / write
machineType 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 [...]
read / write
metadata Metadata
The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
read / write
minCpuPlatform 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".
read / write
name 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.
read / write
networkInterfaces List<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.
read / write
reservationAffinity ReservationAffinity
Specifies the reservations that this instance can consume from.
read / write
resourcePolicies List<String>
Resource policies applied to this instance.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scheduling Scheduling
Sets the scheduling options for this instance.
read / write
Output Only Server-defined URL for this resource.
read / write
serviceAccounts List<ServiceAccount>
A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. [...]
read / write
shieldedInstanceConfig ShieldedInstanceConfig
read / write
shieldedInstanceIntegrityPolicy ShieldedInstanceIntegrityPolicy
read / write
startRestricted bool
Output Only Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
read / write
status String
Output Only The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED. Possible string values are: [...]
read / write
statusMessage String
Output Only An optional, human-readable explanation of the status.
read / write
tags 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.
read / write
zone 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.
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, Object>
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited