public final class Instance extends GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description | 
|---|
Instance()  | 
| Modifier and Type | Method and Description | 
|---|---|
Instance | 
clone()  | 
byte[] | 
decodeFingerprint()
Specifies a fingerprint for this resource, which is essentially a hash of the instance's
 contents and used for optimistic locking. 
 | 
byte[] | 
decodeLabelFingerprint()
A fingerprint for this request, which is essentially a hash of the label's contents and used
 for optimistic locking. 
 | 
Instance | 
encodeFingerprint(byte[] fingerprint)
Specifies a fingerprint for this resource, which is essentially a hash of the instance's
 contents and used for optimistic locking. 
 | 
Instance | 
encodeLabelFingerprint(byte[] labelFingerprint)
A fingerprint for this request, which is essentially a hash of the label's contents and used
 for optimistic locking. 
 | 
AdvancedMachineFeatures | 
getAdvancedMachineFeatures()
Controls for advanced machine-related behavior features. 
 | 
Boolean | 
getCanIpForward()
Allows this instance to send and receive packets with non-matching destination or source IPs. 
 | 
ConfidentialInstanceConfig | 
getConfidentialInstanceConfig()  | 
String | 
getCpuPlatform()
[Output Only] The CPU platform used by this instance. 
 | 
String | 
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format. 
 | 
Boolean | 
getDeletionProtection()
Whether the resource should be protected against deletion. 
 | 
String | 
getDescription()
An optional description of this resource. 
 | 
List<AttachedDisk> | 
getDisks()
Array of disks associated with this instance. 
 | 
DisplayDevice | 
getDisplayDevice()
Enables display device for the instance. 
 | 
Boolean | 
getEraseWindowsVssSignature()
Specifies whether the disks restored from source snapshots or source machine image should erase
 Windows specific VSS signature. 
 | 
String | 
getFingerprint()
Specifies a fingerprint for this resource, which is essentially a hash of the instance's
 contents and used for optimistic locking. 
 | 
List<AcceleratorConfig> | 
getGuestAccelerators()
A list of the type and count of accelerator cards attached to the instance. 
 | 
String | 
getHostname()
Specifies the hostname of the instance. 
 | 
BigInteger | 
getId()
[Output Only] The unique identifier for the resource. 
 | 
CustomerEncryptionKey | 
getInstanceEncryptionKey()
Encrypts or decrypts data for an instance with a customer-supplied encryption key. 
 | 
String | 
getKind()
[Output Only] Type of the resource. 
 | 
String | 
getLabelFingerprint()
A fingerprint for this request, which is essentially a hash of the label's contents and used
 for optimistic locking. 
 | 
Map<String,String> | 
getLabels()
Labels to apply to this instance. 
 | 
String | 
getLastStartTimestamp()
[Output Only] Last start timestamp in RFC3339 text format. 
 | 
String | 
getLastStopTimestamp()
[Output Only] Last stop timestamp in RFC3339 text format. 
 | 
String | 
getLastSuspendedTimestamp()
[Output Only] Last suspended timestamp in RFC3339 text format. 
 | 
String | 
getMachineType()
Full or partial URL of the machine type resource to use for this instance, in the format:
 zones/zone/machineTypes/machine-type. 
 | 
Metadata | 
getMetadata()
The metadata key/value pairs assigned to this instance. 
 | 
String | 
getMinCpuPlatform()
Specifies a minimum CPU platform for the VM instance. 
 | 
String | 
getName()
The name of the resource, provided by the client when initially creating the resource. 
 | 
List<NetworkInterface> | 
getNetworkInterfaces()
An array of network configurations for this instance. 
 | 
String | 
getPostKeyRevocationActionType()
PostKeyRevocationActionType of the instance. 
 | 
Long | 
getPreservedStateSizeGb()
Total amount of preserved state for SUSPENDED instances. 
 | 
String | 
getPrivateIpv6GoogleAccess()
The private IPv6 google access type for the VM. 
 | 
ReservationAffinity | 
getReservationAffinity()
Specifies the reservations that this instance can consume from. 
 | 
List<String> | 
getResourcePolicies()
Resource policies applied to this instance. 
 | 
Boolean | 
getSatisfiesPzs()
[Output Only] Reserved for future use. 
 | 
Scheduling | 
getScheduling()
Sets the scheduling options for this instance. 
 | 
List<String> | 
getSecureLabels()
Secure labels to apply to this instance. 
 | 
String | 
getSelfLink()
[Output Only] Server-defined URL for this resource. 
 | 
String | 
getSelfLinkWithId()
[Output Only] Server-defined URL for this resource with the resource id. 
 | 
List<ServiceAccount> | 
getServiceAccounts()
A list of service accounts, with their specified scopes, authorized for this instance. 
 | 
ShieldedInstanceConfig | 
getShieldedInstanceConfig()  | 
ShieldedInstanceIntegrityPolicy | 
getShieldedInstanceIntegrityPolicy()  | 
ShieldedVmConfig | 
getShieldedVmConfig()
Deprecating, please use shielded_instance_config. 
 | 
ShieldedVmIntegrityPolicy | 
getShieldedVmIntegrityPolicy()
Deprecating, please use shielded_instance_integrity_policy. 
 | 
String | 
getSourceMachineImage()
Source machine image 
 | 
CustomerEncryptionKey | 
getSourceMachineImageEncryptionKey()
Source GMI encryption key when creating an instance from GMI. 
 | 
Boolean | 
getStartRestricted()
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
 suspicious activity. 
 | 
String | 
getStatus()
[Output Only] The status of the instance. 
 | 
String | 
getStatusMessage()
[Output Only] An optional, human-readable explanation of the status. 
 | 
Tags | 
getTags()
Tags to apply to this instance. 
 | 
UpcomingMaintenance | 
getUpcomingMaintenance()
[Output Only] Specifies upcoming maintenance for the instance. 
 | 
String | 
getZone()
[Output Only] URL of the zone where the instance resides. 
 | 
Instance | 
set(String fieldName,
   Object value)  | 
Instance | 
setAdvancedMachineFeatures(AdvancedMachineFeatures advancedMachineFeatures)
Controls for advanced machine-related behavior features. 
 | 
Instance | 
setCanIpForward(Boolean canIpForward)
Allows this instance to send and receive packets with non-matching destination or source IPs. 
 | 
Instance | 
setConfidentialInstanceConfig(ConfidentialInstanceConfig confidentialInstanceConfig)  | 
Instance | 
setCpuPlatform(String cpuPlatform)
[Output Only] The CPU platform used by this instance. 
 | 
Instance | 
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format. 
 | 
Instance | 
setDeletionProtection(Boolean deletionProtection)
Whether the resource should be protected against deletion. 
 | 
Instance | 
setDescription(String description)
An optional description of this resource. 
 | 
Instance | 
setDisks(List<AttachedDisk> disks)
Array of disks associated with this instance. 
 | 
Instance | 
setDisplayDevice(DisplayDevice displayDevice)
Enables display device for the instance. 
 | 
Instance | 
setEraseWindowsVssSignature(Boolean eraseWindowsVssSignature)
Specifies whether the disks restored from source snapshots or source machine image should erase
 Windows specific VSS signature. 
 | 
Instance | 
setFingerprint(String fingerprint)
Specifies a fingerprint for this resource, which is essentially a hash of the instance's
 contents and used for optimistic locking. 
 | 
Instance | 
setGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
A list of the type and count of accelerator cards attached to the instance. 
 | 
Instance | 
setHostname(String hostname)
Specifies the hostname of the instance. 
 | 
Instance | 
setId(BigInteger id)
[Output Only] The unique identifier for the resource. 
 | 
Instance | 
setInstanceEncryptionKey(CustomerEncryptionKey instanceEncryptionKey)
Encrypts or decrypts data for an instance with a customer-supplied encryption key. 
 | 
Instance | 
setKind(String kind)
[Output Only] Type of the resource. 
 | 
Instance | 
setLabelFingerprint(String labelFingerprint)
A fingerprint for this request, which is essentially a hash of the label's contents and used
 for optimistic locking. 
 | 
Instance | 
setLabels(Map<String,String> labels)
Labels to apply to this instance. 
 | 
Instance | 
setLastStartTimestamp(String lastStartTimestamp)
[Output Only] Last start timestamp in RFC3339 text format. 
 | 
Instance | 
setLastStopTimestamp(String lastStopTimestamp)
[Output Only] Last stop timestamp in RFC3339 text format. 
 | 
Instance | 
setLastSuspendedTimestamp(String lastSuspendedTimestamp)
[Output Only] Last suspended timestamp in RFC3339 text format. 
 | 
Instance | 
setMachineType(String machineType)
Full or partial URL of the machine type resource to use for this instance, in the format:
 zones/zone/machineTypes/machine-type. 
 | 
Instance | 
setMetadata(Metadata metadata)
The metadata key/value pairs assigned to this instance. 
 | 
Instance | 
setMinCpuPlatform(String minCpuPlatform)
Specifies a minimum CPU platform for the VM instance. 
 | 
Instance | 
setName(String name)
The name of the resource, provided by the client when initially creating the resource. 
 | 
Instance | 
setNetworkInterfaces(List<NetworkInterface> networkInterfaces)
An array of network configurations for this instance. 
 | 
Instance | 
setPostKeyRevocationActionType(String postKeyRevocationActionType)
PostKeyRevocationActionType of the instance. 
 | 
Instance | 
setPreservedStateSizeGb(Long preservedStateSizeGb)
Total amount of preserved state for SUSPENDED instances. 
 | 
Instance | 
setPrivateIpv6GoogleAccess(String privateIpv6GoogleAccess)
The private IPv6 google access type for the VM. 
 | 
Instance | 
setReservationAffinity(ReservationAffinity reservationAffinity)
Specifies the reservations that this instance can consume from. 
 | 
Instance | 
setResourcePolicies(List<String> resourcePolicies)
Resource policies applied to this instance. 
 | 
Instance | 
setSatisfiesPzs(Boolean satisfiesPzs)
[Output Only] Reserved for future use. 
 | 
Instance | 
setScheduling(Scheduling scheduling)
Sets the scheduling options for this instance. 
 | 
Instance | 
setSecureLabels(List<String> secureLabels)
Secure labels to apply to this instance. 
 | 
Instance | 
setSelfLink(String selfLink)
[Output Only] Server-defined URL for this resource. 
 | 
Instance | 
setSelfLinkWithId(String selfLinkWithId)
[Output Only] Server-defined URL for this resource with the resource id. 
 | 
Instance | 
setServiceAccounts(List<ServiceAccount> serviceAccounts)
A list of service accounts, with their specified scopes, authorized for this instance. 
 | 
Instance | 
setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig)  | 
Instance | 
setShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy)  | 
Instance | 
setShieldedVmConfig(ShieldedVmConfig shieldedVmConfig)
Deprecating, please use shielded_instance_config. 
 | 
Instance | 
setShieldedVmIntegrityPolicy(ShieldedVmIntegrityPolicy shieldedVmIntegrityPolicy)
Deprecating, please use shielded_instance_integrity_policy. 
 | 
Instance | 
setSourceMachineImage(String sourceMachineImage)
Source machine image 
 | 
Instance | 
setSourceMachineImageEncryptionKey(CustomerEncryptionKey sourceMachineImageEncryptionKey)
Source GMI encryption key when creating an instance from GMI. 
 | 
Instance | 
setStartRestricted(Boolean startRestricted)
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
 suspicious activity. 
 | 
Instance | 
setStatus(String status)
[Output Only] The status of the instance. 
 | 
Instance | 
setStatusMessage(String statusMessage)
[Output Only] An optional, human-readable explanation of the status. 
 | 
Instance | 
setTags(Tags tags)
Tags to apply to this instance. 
 | 
Instance | 
setUpcomingMaintenance(UpcomingMaintenance upcomingMaintenance)
[Output Only] Specifies upcoming maintenance for the instance. 
 | 
Instance | 
setZone(String zone)
[Output Only] URL of the zone where the instance resides. 
 | 
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic AdvancedMachineFeatures getAdvancedMachineFeatures()
null for nonepublic Instance setAdvancedMachineFeatures(AdvancedMachineFeatures advancedMachineFeatures)
advancedMachineFeatures - advancedMachineFeatures or null for nonepublic Boolean getCanIpForward()
null for nonepublic Instance setCanIpForward(Boolean canIpForward)
canIpForward - canIpForward or null for nonepublic ConfidentialInstanceConfig getConfidentialInstanceConfig()
null for nonepublic Instance setConfidentialInstanceConfig(ConfidentialInstanceConfig confidentialInstanceConfig)
confidentialInstanceConfig - confidentialInstanceConfig or null for nonepublic String getCpuPlatform()
null for nonepublic Instance setCpuPlatform(String cpuPlatform)
cpuPlatform - cpuPlatform or null for nonepublic String getCreationTimestamp()
null for nonepublic Instance setCreationTimestamp(String creationTimestamp)
creationTimestamp - creationTimestamp or null for nonepublic Boolean getDeletionProtection()
null for nonepublic Instance setDeletionProtection(Boolean deletionProtection)
deletionProtection - deletionProtection or null for nonepublic String getDescription()
null for nonepublic Instance setDescription(String description)
description - description or null for nonepublic List<AttachedDisk> getDisks()
null for nonepublic Instance setDisks(List<AttachedDisk> disks)
disks - disks or null for nonepublic DisplayDevice getDisplayDevice()
null for nonepublic Instance setDisplayDevice(DisplayDevice displayDevice)
displayDevice - displayDevice or null for nonepublic Boolean getEraseWindowsVssSignature()
null for nonepublic Instance setEraseWindowsVssSignature(Boolean eraseWindowsVssSignature)
eraseWindowsVssSignature - eraseWindowsVssSignature or null for nonepublic String getFingerprint()
null for nonedecodeFingerprint()public byte[] decodeFingerprint()
null for nonegetFingerprint()public Instance setFingerprint(String fingerprint)
fingerprint - fingerprint or null for none#encodeFingerprint()public Instance encodeFingerprint(byte[] fingerprint)
 The value is encoded Base64 or {@code null} for none.
 
public List<AcceleratorConfig> getGuestAccelerators()
null for nonepublic Instance setGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
guestAccelerators - guestAccelerators or null for nonepublic String getHostname()
null for nonepublic Instance setHostname(String hostname)
hostname - hostname or null for nonepublic BigInteger getId()
null for nonepublic Instance setId(BigInteger id)
id - id or null for nonepublic CustomerEncryptionKey getInstanceEncryptionKey()
null for nonepublic Instance setInstanceEncryptionKey(CustomerEncryptionKey instanceEncryptionKey)
instanceEncryptionKey - instanceEncryptionKey or null for nonepublic String getKind()
null for nonepublic Instance setKind(String kind)
kind - kind or null for nonepublic String getLabelFingerprint()
null for nonedecodeLabelFingerprint()public byte[] decodeLabelFingerprint()
null for nonegetLabelFingerprint()public Instance setLabelFingerprint(String labelFingerprint)
labelFingerprint - labelFingerprint or null for none#encodeLabelFingerprint()public Instance encodeLabelFingerprint(byte[] labelFingerprint)
 The value is encoded Base64 or {@code null} for none.
 
public Map<String,String> getLabels()
null for nonepublic Instance setLabels(Map<String,String> labels)
labels - labels or null for nonepublic String getLastStartTimestamp()
null for nonepublic Instance setLastStartTimestamp(String lastStartTimestamp)
lastStartTimestamp - lastStartTimestamp or null for nonepublic String getLastStopTimestamp()
null for nonepublic Instance setLastStopTimestamp(String lastStopTimestamp)
lastStopTimestamp - lastStopTimestamp or null for nonepublic String getLastSuspendedTimestamp()
null for nonepublic Instance setLastSuspendedTimestamp(String lastSuspendedTimestamp)
lastSuspendedTimestamp - lastSuspendedTimestamp or null for nonepublic String getMachineType()
null for nonepublic Instance setMachineType(String machineType)
machineType - machineType or null for nonepublic Metadata getMetadata()
null for nonepublic Instance setMetadata(Metadata metadata)
metadata - metadata or null for nonepublic String getMinCpuPlatform()
null for nonepublic Instance setMinCpuPlatform(String minCpuPlatform)
minCpuPlatform - minCpuPlatform or null for nonepublic String getName()
null for nonepublic Instance setName(String name)
name - name or null for nonepublic List<NetworkInterface> getNetworkInterfaces()
null for nonepublic Instance setNetworkInterfaces(List<NetworkInterface> networkInterfaces)
networkInterfaces - networkInterfaces or null for nonepublic String getPostKeyRevocationActionType()
null for nonepublic Instance setPostKeyRevocationActionType(String postKeyRevocationActionType)
postKeyRevocationActionType - postKeyRevocationActionType or null for nonepublic Long getPreservedStateSizeGb()
null for nonepublic Instance setPreservedStateSizeGb(Long preservedStateSizeGb)
preservedStateSizeGb - preservedStateSizeGb or null for nonepublic String getPrivateIpv6GoogleAccess()
null for nonepublic Instance setPrivateIpv6GoogleAccess(String privateIpv6GoogleAccess)
privateIpv6GoogleAccess - privateIpv6GoogleAccess or null for nonepublic ReservationAffinity getReservationAffinity()
null for nonepublic Instance setReservationAffinity(ReservationAffinity reservationAffinity)
reservationAffinity - reservationAffinity or null for nonepublic List<String> getResourcePolicies()
null for nonepublic Instance setResourcePolicies(List<String> resourcePolicies)
resourcePolicies - resourcePolicies or null for nonepublic Boolean getSatisfiesPzs()
null for nonepublic Instance setSatisfiesPzs(Boolean satisfiesPzs)
satisfiesPzs - satisfiesPzs or null for nonepublic Scheduling getScheduling()
null for nonepublic Instance setScheduling(Scheduling scheduling)
scheduling - scheduling or null for nonepublic List<String> getSecureLabels()
null for nonepublic Instance setSecureLabels(List<String> secureLabels)
secureLabels - secureLabels or null for nonepublic String getSelfLink()
null for nonepublic Instance setSelfLink(String selfLink)
selfLink - selfLink or null for nonepublic String getSelfLinkWithId()
null for nonepublic Instance setSelfLinkWithId(String selfLinkWithId)
selfLinkWithId - selfLinkWithId or null for nonepublic List<ServiceAccount> getServiceAccounts()
null for nonepublic Instance setServiceAccounts(List<ServiceAccount> serviceAccounts)
serviceAccounts - serviceAccounts or null for nonepublic ShieldedInstanceConfig getShieldedInstanceConfig()
null for nonepublic Instance setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig)
shieldedInstanceConfig - shieldedInstanceConfig or null for nonepublic ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy()
null for nonepublic Instance setShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy)
shieldedInstanceIntegrityPolicy - shieldedInstanceIntegrityPolicy or null for nonepublic ShieldedVmConfig getShieldedVmConfig()
null for nonepublic Instance setShieldedVmConfig(ShieldedVmConfig shieldedVmConfig)
shieldedVmConfig - shieldedVmConfig or null for nonepublic ShieldedVmIntegrityPolicy getShieldedVmIntegrityPolicy()
null for nonepublic Instance setShieldedVmIntegrityPolicy(ShieldedVmIntegrityPolicy shieldedVmIntegrityPolicy)
shieldedVmIntegrityPolicy - shieldedVmIntegrityPolicy or null for nonepublic String getSourceMachineImage()
null for nonepublic Instance setSourceMachineImage(String sourceMachineImage)
sourceMachineImage - sourceMachineImage or null for nonepublic CustomerEncryptionKey getSourceMachineImageEncryptionKey()
null for nonepublic Instance setSourceMachineImageEncryptionKey(CustomerEncryptionKey sourceMachineImageEncryptionKey)
sourceMachineImageEncryptionKey - sourceMachineImageEncryptionKey or null for nonepublic Boolean getStartRestricted()
null for nonepublic Instance setStartRestricted(Boolean startRestricted)
startRestricted - startRestricted or null for nonepublic String getStatus()
null for nonepublic Instance setStatus(String status)
status - status or null for nonepublic String getStatusMessage()
null for nonepublic Instance setStatusMessage(String statusMessage)
statusMessage - statusMessage or null for nonepublic Tags getTags()
null for nonepublic Instance setTags(Tags tags)
tags - tags or null for nonepublic UpcomingMaintenance getUpcomingMaintenance()
null for nonepublic Instance setUpcomingMaintenance(UpcomingMaintenance upcomingMaintenance)
upcomingMaintenance - upcomingMaintenance or null for nonepublic String getZone()
null for nonepublic Instance setZone(String zone)
zone - zone or null for nonepublic Instance set(String fieldName, Object value)
set in class GenericJsonpublic Instance clone()
clone in class GenericJsonCopyright © 2011–2020 Google. All rights reserved.