
target.apidocs.com.google.api.services.compute.model.Instance.html Maven / Gradle / Ivy
Instance (Compute Engine API alpha-rev20200526-1.30.9)
com.google.api.services.compute.model
Class Instance
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.Instance
-
public final class Instance
extends GenericJson
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 ==)
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
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Instance()
-
Method Summary
All Methods Instance Methods Concrete Methods
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.
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
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()
Specifies whether this instance will be shut down on key revocation.
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.
Scheduling
getScheduling()
Sets the scheduling options for 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()
ShieldedVmIntegrityPolicy
getShieldedVmIntegrityPolicy()
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
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
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)
Specifies whether this instance will be shut down on key revocation.
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
setScheduling(Scheduling scheduling)
Sets the scheduling options for 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)
Instance
setShieldedVmIntegrityPolicy(ShieldedVmIntegrityPolicy shieldedVmIntegrityPolicy)
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.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getCanIpForward
public Boolean getCanIpForward()
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.
- Returns:
- value or
null
for none
-
setCanIpForward
public Instance setCanIpForward(Boolean 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.
- Parameters:
canIpForward
- canIpForward or null
for none
-
getConfidentialInstanceConfig
public ConfidentialInstanceConfig getConfidentialInstanceConfig()
- Returns:
- value or
null
for none
-
setConfidentialInstanceConfig
public Instance setConfidentialInstanceConfig(ConfidentialInstanceConfig confidentialInstanceConfig)
- Parameters:
confidentialInstanceConfig
- confidentialInstanceConfig or null
for none
-
getCpuPlatform
public String getCpuPlatform()
[Output Only] The CPU platform used by this instance.
- Returns:
- value or
null
for none
-
setCpuPlatform
public Instance setCpuPlatform(String cpuPlatform)
[Output Only] The CPU platform used by this instance.
- Parameters:
cpuPlatform
- cpuPlatform or null
for none
-
getCreationTimestamp
public String getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
- Returns:
- value or
null
for none
-
setCreationTimestamp
public Instance setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
- Parameters:
creationTimestamp
- creationTimestamp or null
for none
-
getDeletionProtection
public Boolean getDeletionProtection()
Whether the resource should be protected against deletion.
- Returns:
- value or
null
for none
-
setDeletionProtection
public Instance setDeletionProtection(Boolean deletionProtection)
Whether the resource should be protected against deletion.
- Parameters:
deletionProtection
- deletionProtection or null
for none
-
getDescription
public String getDescription()
An optional description of this resource. Provide this property when you create the resource.
- Returns:
- value or
null
for none
-
setDescription
public Instance setDescription(String description)
An optional description of this resource. Provide this property when you create the resource.
- Parameters:
description
- description or null
for none
-
getDisks
public List<AttachedDisk> getDisks()
Array of disks associated with this instance. Persistent disks must be created before you can
assign them.
- Returns:
- value or
null
for none
-
setDisks
public Instance setDisks(List<AttachedDisk> disks)
Array of disks associated with this instance. Persistent disks must be created before you can
assign them.
- Parameters:
disks
- disks or null
for none
-
getDisplayDevice
public DisplayDevice getDisplayDevice()
Enables display device for the instance.
- Returns:
- value or
null
for none
-
setDisplayDevice
public Instance setDisplayDevice(DisplayDevice displayDevice)
Enables display device for the instance.
- Parameters:
displayDevice
- displayDevice or null
for none
-
getEraseWindowsVssSignature
public Boolean getEraseWindowsVssSignature()
Specifies whether the disks restored from source snapshots or source machine image should erase
Windows specific VSS signature.
- Returns:
- value or
null
for none
-
setEraseWindowsVssSignature
public Instance setEraseWindowsVssSignature(Boolean eraseWindowsVssSignature)
Specifies whether the disks restored from source snapshots or source machine image should erase
Windows specific VSS signature.
- Parameters:
eraseWindowsVssSignature
- eraseWindowsVssSignature or null
for none
-
getFingerprint
public String getFingerprint()
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.
- Returns:
- value or
null
for none
- See Also:
decodeFingerprint()
-
decodeFingerprint
public byte[] decodeFingerprint()
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.
- Returns:
- Base64 decoded value or
null
for none
- Since:
- 1.14
- See Also:
getFingerprint()
-
setFingerprint
public 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. 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.
- Parameters:
fingerprint
- fingerprint or null
for none
- See Also:
#encodeFingerprint()
-
encodeFingerprint
public 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. 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.
- Since:
- 1.14
- See Also:
The value is encoded Base64 or {@code null} for none.
-
getGuestAccelerators
public List<AcceleratorConfig> getGuestAccelerators()
A list of the type and count of accelerator cards attached to the instance.
- Returns:
- value or
null
for none
-
setGuestAccelerators
public Instance setGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
A list of the type and count of accelerator cards attached to the instance.
- Parameters:
guestAccelerators
- guestAccelerators or null
for none
-
getHostname
public String getHostname()
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.
- Returns:
- value or
null
for none
-
setHostname
public Instance setHostname(String 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.
- Parameters:
hostname
- hostname or null
for none
-
getId
public BigInteger getId()
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- Returns:
- value or
null
for none
-
setId
public Instance setId(BigInteger id)
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- Parameters:
id
- id or null
for none
-
getInstanceEncryptionKey
public CustomerEncryptionKey getInstanceEncryptionKey()
Encrypts or decrypts data for an instance with a customer-supplied encryption key.
If you are creating a new instance, this field encrypts the local SSD and in-memory contents of
the instance using a key that you provide.
If you are restarting an instance protected with a customer-supplied encryption key, you must
provide the correct key in order to successfully restart the instance.
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 and you do not need to
provide a key to start the instance later.
Instance templates do not store customer-supplied encryption keys, so you cannot use your own
keys to encrypt local SSDs and in-memory content in a managed instance group.
- Returns:
- value or
null
for none
-
setInstanceEncryptionKey
public Instance setInstanceEncryptionKey(CustomerEncryptionKey instanceEncryptionKey)
Encrypts or decrypts data for an instance with a customer-supplied encryption key.
If you are creating a new instance, this field encrypts the local SSD and in-memory contents of
the instance using a key that you provide.
If you are restarting an instance protected with a customer-supplied encryption key, you must
provide the correct key in order to successfully restart the instance.
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 and you do not need to
provide a key to start the instance later.
Instance templates do not store customer-supplied encryption keys, so you cannot use your own
keys to encrypt local SSDs and in-memory content in a managed instance group.
- Parameters:
instanceEncryptionKey
- instanceEncryptionKey or null
for none
-
getKind
public String getKind()
[Output Only] Type of the resource. Always compute#instance for instances.
- Returns:
- value or
null
for none
-
setKind
public Instance setKind(String kind)
[Output Only] Type of the resource. Always compute#instance for instances.
- Parameters:
kind
- kind or null
for none
-
getLabelFingerprint
public String getLabelFingerprint()
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.
- Returns:
- value or
null
for none
- See Also:
decodeLabelFingerprint()
-
decodeLabelFingerprint
public byte[] decodeLabelFingerprint()
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.
- Returns:
- Base64 decoded value or
null
for none
- Since:
- 1.14
- See Also:
getLabelFingerprint()
-
setLabelFingerprint
public Instance setLabelFingerprint(String 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.
- Parameters:
labelFingerprint
- labelFingerprint or null
for none
- See Also:
#encodeLabelFingerprint()
-
encodeLabelFingerprint
public Instance encodeLabelFingerprint(byte[] 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.
- Since:
- 1.14
- See Also:
The value is encoded Base64 or {@code null} for none.
-
getLabels
public Map<String,String> getLabels()
Labels to apply to this instance. These can be later modified by the setLabels method.
- Returns:
- value or
null
for none
-
setLabels
public Instance setLabels(Map<String,String> labels)
Labels to apply to this instance. These can be later modified by the setLabels method.
- Parameters:
labels
- labels or null
for none
-
getMachineType
public String getMachineType()
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.
- Returns:
- value or
null
for none
-
setMachineType
public 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. 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.
- Parameters:
machineType
- machineType or null
for none
-
getMetadata
public Metadata getMetadata()
The metadata key/value pairs assigned to this instance. This includes custom metadata and
predefined keys.
- Returns:
- value or
null
for none
-
setMetadata
public Instance setMetadata(Metadata metadata)
The metadata key/value pairs assigned to this instance. This includes custom metadata and
predefined keys.
- Parameters:
metadata
- metadata or null
for none
-
getMinCpuPlatform
public String getMinCpuPlatform()
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".
- Returns:
- value or
null
for none
-
setMinCpuPlatform
public Instance setMinCpuPlatform(String minCpuPlatform)
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".
- Parameters:
minCpuPlatform
- minCpuPlatform or null
for none
-
getName
public String getName()
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.
- Returns:
- value or
null
for none
-
setName
public Instance setName(String 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.
- Parameters:
name
- name or null
for none
-
getNetworkInterfaces
public List<NetworkInterface> getNetworkInterfaces()
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.
- Returns:
- value or
null
for none
-
setNetworkInterfaces
public Instance setNetworkInterfaces(List<NetworkInterface> 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.
- Parameters:
networkInterfaces
- networkInterfaces or null
for none
-
getPostKeyRevocationActionType
public String getPostKeyRevocationActionType()
Specifies whether this instance will be shut down on key revocation.
- Returns:
- value or
null
for none
-
setPostKeyRevocationActionType
public Instance setPostKeyRevocationActionType(String postKeyRevocationActionType)
Specifies whether this instance will be shut down on key revocation.
- Parameters:
postKeyRevocationActionType
- postKeyRevocationActionType or null
for none
-
getPreservedStateSizeGb
public Long getPreservedStateSizeGb()
Total amount of preserved state for SUSPENDED instances. Read-only in the api.
- Returns:
- value or
null
for none
-
setPreservedStateSizeGb
public Instance setPreservedStateSizeGb(Long preservedStateSizeGb)
Total amount of preserved state for SUSPENDED instances. Read-only in the api.
- Parameters:
preservedStateSizeGb
- preservedStateSizeGb or null
for none
-
getPrivateIpv6GoogleAccess
public String getPrivateIpv6GoogleAccess()
The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK
as default.
- Returns:
- value or
null
for none
-
setPrivateIpv6GoogleAccess
public Instance setPrivateIpv6GoogleAccess(String privateIpv6GoogleAccess)
The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK
as default.
- Parameters:
privateIpv6GoogleAccess
- privateIpv6GoogleAccess or null
for none
-
getReservationAffinity
public ReservationAffinity getReservationAffinity()
Specifies the reservations that this instance can consume from.
- Returns:
- value or
null
for none
-
setReservationAffinity
public Instance setReservationAffinity(ReservationAffinity reservationAffinity)
Specifies the reservations that this instance can consume from.
- Parameters:
reservationAffinity
- reservationAffinity or null
for none
-
getResourcePolicies
public List<String> getResourcePolicies()
Resource policies applied to this instance.
- Returns:
- value or
null
for none
-
setResourcePolicies
public Instance setResourcePolicies(List<String> resourcePolicies)
Resource policies applied to this instance.
- Parameters:
resourcePolicies
- resourcePolicies or null
for none
-
getScheduling
public Scheduling getScheduling()
Sets the scheduling options for this instance.
- Returns:
- value or
null
for none
-
setScheduling
public Instance setScheduling(Scheduling scheduling)
Sets the scheduling options for this instance.
- Parameters:
scheduling
- scheduling or null
for none
-
getSelfLink
public String getSelfLink()
[Output Only] Server-defined URL for this resource.
- Returns:
- value or
null
for none
-
setSelfLink
public Instance setSelfLink(String selfLink)
[Output Only] Server-defined URL for this resource.
- Parameters:
selfLink
- selfLink or null
for none
-
getSelfLinkWithId
public String getSelfLinkWithId()
[Output Only] Server-defined URL for this resource with the resource id.
- Returns:
- value or
null
for none
-
setSelfLinkWithId
public Instance setSelfLinkWithId(String selfLinkWithId)
[Output Only] Server-defined URL for this resource with the resource id.
- Parameters:
selfLinkWithId
- selfLinkWithId or null
for none
-
getServiceAccounts
public List<ServiceAccount> getServiceAccounts()
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.
- Returns:
- value or
null
for none
-
setServiceAccounts
public Instance setServiceAccounts(List<ServiceAccount> 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.
- Parameters:
serviceAccounts
- serviceAccounts or null
for none
-
getShieldedInstanceConfig
public ShieldedInstanceConfig getShieldedInstanceConfig()
- Returns:
- value or
null
for none
-
setShieldedInstanceConfig
public Instance setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig)
- Parameters:
shieldedInstanceConfig
- shieldedInstanceConfig or null
for none
-
getShieldedInstanceIntegrityPolicy
public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy()
- Returns:
- value or
null
for none
-
setShieldedInstanceIntegrityPolicy
public Instance setShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy)
- Parameters:
shieldedInstanceIntegrityPolicy
- shieldedInstanceIntegrityPolicy or null
for none
-
getShieldedVmConfig
public ShieldedVmConfig getShieldedVmConfig()
- Returns:
- value or
null
for none
-
setShieldedVmConfig
public Instance setShieldedVmConfig(ShieldedVmConfig shieldedVmConfig)
- Parameters:
shieldedVmConfig
- shieldedVmConfig or null
for none
-
getShieldedVmIntegrityPolicy
public ShieldedVmIntegrityPolicy getShieldedVmIntegrityPolicy()
- Returns:
- value or
null
for none
-
setShieldedVmIntegrityPolicy
public Instance setShieldedVmIntegrityPolicy(ShieldedVmIntegrityPolicy shieldedVmIntegrityPolicy)
- Parameters:
shieldedVmIntegrityPolicy
- shieldedVmIntegrityPolicy or null
for none
-
getSourceMachineImage
public String getSourceMachineImage()
Source machine image
- Returns:
- value or
null
for none
-
setSourceMachineImage
public Instance setSourceMachineImage(String sourceMachineImage)
Source machine image
- Parameters:
sourceMachineImage
- sourceMachineImage or null
for none
-
getSourceMachineImageEncryptionKey
public CustomerEncryptionKey getSourceMachineImageEncryptionKey()
Source GMI encryption key when creating an instance from GMI.
- Returns:
- value or
null
for none
-
setSourceMachineImageEncryptionKey
public Instance setSourceMachineImageEncryptionKey(CustomerEncryptionKey sourceMachineImageEncryptionKey)
Source GMI encryption key when creating an instance from GMI.
- Parameters:
sourceMachineImageEncryptionKey
- sourceMachineImageEncryptionKey or null
for none
-
getStartRestricted
public Boolean getStartRestricted()
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
- Returns:
- value or
null
for none
-
setStartRestricted
public Instance setStartRestricted(Boolean startRestricted)
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
- Parameters:
startRestricted
- startRestricted or null
for none
-
getStatus
public String getStatus()
[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING,
RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
- Returns:
- value or
null
for none
-
setStatus
public Instance setStatus(String status)
[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING,
RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
- Parameters:
status
- status or null
for none
-
getStatusMessage
public String getStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
- Returns:
- value or
null
for none
-
setStatusMessage
public Instance setStatusMessage(String statusMessage)
[Output Only] An optional, human-readable explanation of the status.
- Parameters:
statusMessage
- statusMessage or null
for none
-
getTags
public Tags getTags()
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.
- Returns:
- value or
null
for none
-
setTags
public Instance setTags(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.
- Parameters:
tags
- tags or null
for none
-
getUpcomingMaintenance
public UpcomingMaintenance getUpcomingMaintenance()
[Output Only] Specifies upcoming maintenance for the instance.
- Returns:
- value or
null
for none
-
setUpcomingMaintenance
public Instance setUpcomingMaintenance(UpcomingMaintenance upcomingMaintenance)
[Output Only] Specifies upcoming maintenance for the instance.
- Parameters:
upcomingMaintenance
- upcomingMaintenance or null
for none
-
getZone
public String getZone()
[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.
- Returns:
- value or
null
for none
-
setZone
public Instance setZone(String 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.
- Parameters:
zone
- zone or null
for none
-
set
public Instance set(String fieldName,
Object value)
- Overrides:
set
in class GenericJson
-
clone
public Instance clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2020 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy