![JAR search and dependency download from the Maven repository](/logo.png)
target.apidocs.com.google.api.services.compute.model.Instance.html Maven / Gradle / Ivy
Instance (Compute Engine API beta-rev20220726-2.0.0)
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.
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.
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.
String
getKeyRevocationActionType()
KeyRevocationActionType of the instance.
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.
NetworkPerformanceConfig
getNetworkPerformanceConfig()
InstanceParams
getParams()
Input only.
String
getPostKeyRevocationActionType()
PostKeyRevocationActionType of the instance.
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.
String
getSelfLink()
[Output Only] Server-defined URL for this resource.
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 machine image encryption key when creating an instance from a machine image.
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.
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
setKeyRevocationActionType(String keyRevocationActionType)
KeyRevocationActionType of the instance.
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
setNetworkPerformanceConfig(NetworkPerformanceConfig networkPerformanceConfig)
Instance
setParams(InstanceParams params)
Input only.
Instance
setPostKeyRevocationActionType(String postKeyRevocationActionType)
PostKeyRevocationActionType of the instance.
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
setSelfLink(String selfLink)
[Output Only] Server-defined URL for this resource.
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 machine image encryption key when creating an instance from a machine image.
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
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
-
getAdvancedMachineFeatures
public AdvancedMachineFeatures getAdvancedMachineFeatures()
Controls for advanced machine-related behavior features.
- Returns:
- value or
null
for none
-
setAdvancedMachineFeatures
public Instance setAdvancedMachineFeatures(AdvancedMachineFeatures advancedMachineFeatures)
Controls for advanced machine-related behavior features.
- Parameters:
advancedMachineFeatures
- advancedMachineFeatures or null
for none
-
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
-
getKeyRevocationActionType
public String getKeyRevocationActionType()
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default
value is "NONE" if it is not specified.
- Returns:
- value or
null
for none
-
setKeyRevocationActionType
public Instance setKeyRevocationActionType(String keyRevocationActionType)
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default
value is "NONE" if it is not specified.
- Parameters:
keyRevocationActionType
- keyRevocationActionType 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
-
getLastStartTimestamp
public String getLastStartTimestamp()
[Output Only] Last start timestamp in RFC3339 text format.
- Returns:
- value or
null
for none
-
setLastStartTimestamp
public Instance setLastStartTimestamp(String lastStartTimestamp)
[Output Only] Last start timestamp in RFC3339 text format.
- Parameters:
lastStartTimestamp
- lastStartTimestamp or null
for none
-
getLastStopTimestamp
public String getLastStopTimestamp()
[Output Only] Last stop timestamp in RFC3339 text format.
- Returns:
- value or
null
for none
-
setLastStopTimestamp
public Instance setLastStopTimestamp(String lastStopTimestamp)
[Output Only] Last stop timestamp in RFC3339 text format.
- Parameters:
lastStopTimestamp
- lastStopTimestamp or null
for none
-
getLastSuspendedTimestamp
public String getLastSuspendedTimestamp()
[Output Only] Last suspended timestamp in RFC3339 text format.
- Returns:
- value or
null
for none
-
setLastSuspendedTimestamp
public Instance setLastSuspendedTimestamp(String lastSuspendedTimestamp)
[Output Only] Last suspended timestamp in RFC3339 text format.
- Parameters:
lastSuspendedTimestamp
- lastSuspendedTimestamp 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
-
getNetworkPerformanceConfig
public NetworkPerformanceConfig getNetworkPerformanceConfig()
- Returns:
- value or
null
for none
-
setNetworkPerformanceConfig
public Instance setNetworkPerformanceConfig(NetworkPerformanceConfig networkPerformanceConfig)
- Parameters:
networkPerformanceConfig
- networkPerformanceConfig or null
for none
-
getParams
public InstanceParams getParams()
Input only. [Input Only] Additional params passed with the request, but not persisted as part
of resource payload.
- Returns:
- value or
null
for none
-
setParams
public Instance setParams(InstanceParams params)
Input only. [Input Only] Additional params passed with the request, but not persisted as part
of resource payload.
- Parameters:
params
- params or null
for none
-
getPostKeyRevocationActionType
public String getPostKeyRevocationActionType()
PostKeyRevocationActionType of the instance.
- Returns:
- value or
null
for none
-
setPostKeyRevocationActionType
public Instance setPostKeyRevocationActionType(String postKeyRevocationActionType)
PostKeyRevocationActionType of the instance.
- Parameters:
postKeyRevocationActionType
- postKeyRevocationActionType 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
-
getSatisfiesPzs
public Boolean getSatisfiesPzs()
[Output Only] Reserved for future use.
- Returns:
- value or
null
for none
-
setSatisfiesPzs
public Instance setSatisfiesPzs(Boolean satisfiesPzs)
[Output Only] Reserved for future use.
- Parameters:
satisfiesPzs
- satisfiesPzs 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
-
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()
Deprecating, please use shielded_instance_config.
- Returns:
- value or
null
for none
-
setShieldedVmConfig
public Instance setShieldedVmConfig(ShieldedVmConfig shieldedVmConfig)
Deprecating, please use shielded_instance_config.
- Parameters:
shieldedVmConfig
- shieldedVmConfig or null
for none
-
getShieldedVmIntegrityPolicy
public ShieldedVmIntegrityPolicy getShieldedVmIntegrityPolicy()
Deprecating, please use shielded_instance_integrity_policy.
- Returns:
- value or
null
for none
-
setShieldedVmIntegrityPolicy
public Instance setShieldedVmIntegrityPolicy(ShieldedVmIntegrityPolicy shieldedVmIntegrityPolicy)
Deprecating, please use shielded_instance_integrity_policy.
- 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 machine image encryption key when creating an instance from a machine image.
- Returns:
- value or
null
for none
-
setSourceMachineImageEncryptionKey
public Instance setSourceMachineImageEncryptionKey(CustomerEncryptionKey sourceMachineImageEncryptionKey)
Source machine image encryption key when creating an instance from a machine image.
- 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. For more information about
the status of the instance, see Instance life cycle.
- 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. For more information about
the status of the instance, see Instance life cycle.
- 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
-
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–2022 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy