target.apidocs.com.google.api.services.compute.model.InstanceProperties.html Maven / Gradle / Ivy
The newest version!
InstanceProperties (Compute Engine API v1-rev20250320-2.0.0)
com.google.api.services.compute.model
Class InstanceProperties
- 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.InstanceProperties
-
public final class InstanceProperties
extends com.google.api.client.json.GenericJson
Model definition for InstanceProperties.
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
com.google.api.client.util.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
InstanceProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
InstanceProperties
clone()
AdvancedMachineFeatures
getAdvancedMachineFeatures()
Controls for advanced machine-related behavior features.
Boolean
getCanIpForward()
Enables instances created based on these properties to send packets with source IP addresses
other than their own and receive packets with destination IP addresses other than their own.
ConfidentialInstanceConfig
getConfidentialInstanceConfig()
Specifies the Confidential Instance options.
String
getDescription()
An optional text description for the instances that are created from these properties.
List<AttachedDisk>
getDisks()
An array of disks that are associated with the instances that are created from these
properties.
List<AcceleratorConfig>
getGuestAccelerators()
A list of guest accelerator cards' type and count to use for instances created from these
properties.
String
getKeyRevocationActionType()
KeyRevocationActionType of the instance.
Map<String,String>
getLabels()
Labels to apply to instances that are created from these properties.
String
getMachineType()
The machine type to use for instances that are created from these properties.
Metadata
getMetadata()
The metadata key/value pairs to assign to instances that are created from these properties.
String
getMinCpuPlatform()
Minimum cpu/platform to be used by instances.
List<NetworkInterface>
getNetworkInterfaces()
An array of network access configurations for this interface.
NetworkPerformanceConfig
getNetworkPerformanceConfig()
Note that for MachineImage, this is not supported yet.
String
getPrivateIpv6GoogleAccess()
The private IPv6 google access type for VMs.
ReservationAffinity
getReservationAffinity()
Specifies the reservations that instances can consume from.
Map<String,String>
getResourceManagerTags()
Resource manager tags to be bound to the instance.
List<String>
getResourcePolicies()
Resource policies (names, not URLs) applied to instances created from these properties.
Scheduling
getScheduling()
Specifies the scheduling options for the instances that are created from these properties.
List<ServiceAccount>
getServiceAccounts()
A list of service accounts with specified scopes.
ShieldedInstanceConfig
getShieldedInstanceConfig()
Note that for MachineImage, this is not supported yet.
Tags
getTags()
A list of tags to apply to the instances that are created from these properties.
InstanceProperties
set(String fieldName,
Object value)
InstanceProperties
setAdvancedMachineFeatures(AdvancedMachineFeatures advancedMachineFeatures)
Controls for advanced machine-related behavior features.
InstanceProperties
setCanIpForward(Boolean canIpForward)
Enables instances created based on these properties to send packets with source IP addresses
other than their own and receive packets with destination IP addresses other than their own.
InstanceProperties
setConfidentialInstanceConfig(ConfidentialInstanceConfig confidentialInstanceConfig)
Specifies the Confidential Instance options.
InstanceProperties
setDescription(String description)
An optional text description for the instances that are created from these properties.
InstanceProperties
setDisks(List<AttachedDisk> disks)
An array of disks that are associated with the instances that are created from these
properties.
InstanceProperties
setGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
A list of guest accelerator cards' type and count to use for instances created from these
properties.
InstanceProperties
setKeyRevocationActionType(String keyRevocationActionType)
KeyRevocationActionType of the instance.
InstanceProperties
setLabels(Map<String,String> labels)
Labels to apply to instances that are created from these properties.
InstanceProperties
setMachineType(String machineType)
The machine type to use for instances that are created from these properties.
InstanceProperties
setMetadata(Metadata metadata)
The metadata key/value pairs to assign to instances that are created from these properties.
InstanceProperties
setMinCpuPlatform(String minCpuPlatform)
Minimum cpu/platform to be used by instances.
InstanceProperties
setNetworkInterfaces(List<NetworkInterface> networkInterfaces)
An array of network access configurations for this interface.
InstanceProperties
setNetworkPerformanceConfig(NetworkPerformanceConfig networkPerformanceConfig)
Note that for MachineImage, this is not supported yet.
InstanceProperties
setPrivateIpv6GoogleAccess(String privateIpv6GoogleAccess)
The private IPv6 google access type for VMs.
InstanceProperties
setReservationAffinity(ReservationAffinity reservationAffinity)
Specifies the reservations that instances can consume from.
InstanceProperties
setResourceManagerTags(Map<String,String> resourceManagerTags)
Resource manager tags to be bound to the instance.
InstanceProperties
setResourcePolicies(List<String> resourcePolicies)
Resource policies (names, not URLs) applied to instances created from these properties.
InstanceProperties
setScheduling(Scheduling scheduling)
Specifies the scheduling options for the instances that are created from these properties.
InstanceProperties
setServiceAccounts(List<ServiceAccount> serviceAccounts)
A list of service accounts with specified scopes.
InstanceProperties
setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig)
Note that for MachineImage, this is not supported yet.
InstanceProperties
setTags(Tags tags)
A list of tags to apply to the instances that are created from these properties.
-
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. Note that for MachineImage, this is
not supported yet.
- Returns:
- value or
null for none
-
setAdvancedMachineFeatures
public InstanceProperties setAdvancedMachineFeatures(AdvancedMachineFeatures advancedMachineFeatures)
Controls for advanced machine-related behavior features. Note that for MachineImage, this is
not supported yet.
- Parameters:
advancedMachineFeatures - advancedMachineFeatures or null for none
-
getCanIpForward
public Boolean getCanIpForward()
Enables instances created based on these properties to send packets with source IP addresses
other than their own and receive packets with destination IP addresses other than their own. If
these instances will be used as an IP gateway or it will be set as the next-hop in a Route
resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding
documentation for more information.
- Returns:
- value or
null for none
-
setCanIpForward
public InstanceProperties setCanIpForward(Boolean canIpForward)
Enables instances created based on these properties to send packets with source IP addresses
other than their own and receive packets with destination IP addresses other than their own. If
these instances will be used as an IP gateway or it will be set as the next-hop in a Route
resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding
documentation for more information.
- Parameters:
canIpForward - canIpForward or null for none
-
getConfidentialInstanceConfig
public ConfidentialInstanceConfig getConfidentialInstanceConfig()
Specifies the Confidential Instance options. Note that for MachineImage, this is not supported
yet.
- Returns:
- value or
null for none
-
setConfidentialInstanceConfig
public InstanceProperties setConfidentialInstanceConfig(ConfidentialInstanceConfig confidentialInstanceConfig)
Specifies the Confidential Instance options. Note that for MachineImage, this is not supported
yet.
- Parameters:
confidentialInstanceConfig - confidentialInstanceConfig or null for none
-
getDescription
public String getDescription()
An optional text description for the instances that are created from these properties.
- Returns:
- value or
null for none
-
setDescription
public InstanceProperties setDescription(String description)
An optional text description for the instances that are created from these properties.
- Parameters:
description - description or null for none
-
getDisks
public List<AttachedDisk> getDisks()
An array of disks that are associated with the instances that are created from these
properties.
- Returns:
- value or
null for none
-
setDisks
public InstanceProperties setDisks(List<AttachedDisk> disks)
An array of disks that are associated with the instances that are created from these
properties.
- Parameters:
disks - disks or null for none
-
getGuestAccelerators
public List<AcceleratorConfig> getGuestAccelerators()
A list of guest accelerator cards' type and count to use for instances created from these
properties.
- Returns:
- value or
null for none
-
setGuestAccelerators
public InstanceProperties setGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
A list of guest accelerator cards' type and count to use for instances created from these
properties.
- Parameters:
guestAccelerators - guestAccelerators 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 InstanceProperties 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
-
getLabels
public Map<String,String> getLabels()
Labels to apply to instances that are created from these properties.
- Returns:
- value or
null for none
-
setLabels
public InstanceProperties setLabels(Map<String,String> labels)
Labels to apply to instances that are created from these properties.
- Parameters:
labels - labels or null for none
-
getMachineType
public String getMachineType()
The machine type to use for instances that are created from these properties. This field only
accepts a machine type name, for example `n2-standard-4`. If you use the machine type full or
partial URL, for example `projects/my-l7ilb-project/zones/us-
central1-a/machineTypes/n2-standard-4`, the request will result in an `INTERNAL_ERROR`.
- Returns:
- value or
null for none
-
setMachineType
public InstanceProperties setMachineType(String machineType)
The machine type to use for instances that are created from these properties. This field only
accepts a machine type name, for example `n2-standard-4`. If you use the machine type full or
partial URL, for example `projects/my-l7ilb-project/zones/us-
central1-a/machineTypes/n2-standard-4`, the request will result in an `INTERNAL_ERROR`.
- Parameters:
machineType - machineType or null for none
-
getMetadata
public Metadata getMetadata()
The metadata key/value pairs to assign to instances that are created from these properties.
These pairs can consist of custom metadata or predefined keys. See Project and instance
metadata for more information.
- Returns:
- value or
null for none
-
setMetadata
public InstanceProperties setMetadata(Metadata metadata)
The metadata key/value pairs to assign to instances that are created from these properties.
These pairs can consist of custom metadata or predefined keys. See Project and instance
metadata for more information.
- Parameters:
metadata - metadata or null for none
-
getMinCpuPlatform
public String getMinCpuPlatform()
Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or
newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as
minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information,
read Specifying a Minimum CPU Platform.
- Returns:
- value or
null for none
-
setMinCpuPlatform
public InstanceProperties setMinCpuPlatform(String minCpuPlatform)
Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or
newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as
minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information,
read Specifying a Minimum CPU Platform.
- Parameters:
minCpuPlatform - minCpuPlatform or null for none
-
getNetworkInterfaces
public List<NetworkInterface> getNetworkInterfaces()
An array of network access configurations for this interface.
- Returns:
- value or
null for none
-
setNetworkInterfaces
public InstanceProperties setNetworkInterfaces(List<NetworkInterface> networkInterfaces)
An array of network access configurations for this interface.
- Parameters:
networkInterfaces - networkInterfaces or null for none
-
getNetworkPerformanceConfig
public NetworkPerformanceConfig getNetworkPerformanceConfig()
Note that for MachineImage, this is not supported yet.
- Returns:
- value or
null for none
-
setNetworkPerformanceConfig
public InstanceProperties setNetworkPerformanceConfig(NetworkPerformanceConfig networkPerformanceConfig)
Note that for MachineImage, this is not supported yet.
- Parameters:
networkPerformanceConfig - networkPerformanceConfig or null for none
-
getPrivateIpv6GoogleAccess
public String getPrivateIpv6GoogleAccess()
The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as
default. Note that for MachineImage, this is not supported yet.
- Returns:
- value or
null for none
-
setPrivateIpv6GoogleAccess
public InstanceProperties setPrivateIpv6GoogleAccess(String privateIpv6GoogleAccess)
The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as
default. Note that for MachineImage, this is not supported yet.
- Parameters:
privateIpv6GoogleAccess - privateIpv6GoogleAccess or null for none
-
getReservationAffinity
public ReservationAffinity getReservationAffinity()
Specifies the reservations that instances can consume from. Note that for MachineImage, this is
not supported yet.
- Returns:
- value or
null for none
-
setReservationAffinity
public InstanceProperties setReservationAffinity(ReservationAffinity reservationAffinity)
Specifies the reservations that instances can consume from. Note that for MachineImage, this is
not supported yet.
- Parameters:
reservationAffinity - reservationAffinity or null for none
-
getResourceManagerTags
public Map<String,String> getResourceManagerTags()
Resource manager tags to be bound to the instance. Tag keys and values have the same definition
as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in
the format `tagValues/456`. The field is ignored (both PUT & PATCH) when empty.
- Returns:
- value or
null for none
-
setResourceManagerTags
public InstanceProperties setResourceManagerTags(Map<String,String> resourceManagerTags)
Resource manager tags to be bound to the instance. Tag keys and values have the same definition
as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in
the format `tagValues/456`. The field is ignored (both PUT & PATCH) when empty.
- Parameters:
resourceManagerTags - resourceManagerTags or null for none
-
getResourcePolicies
public List<String> getResourcePolicies()
Resource policies (names, not URLs) applied to instances created from these properties. Note
that for MachineImage, this is not supported yet.
- Returns:
- value or
null for none
-
setResourcePolicies
public InstanceProperties setResourcePolicies(List<String> resourcePolicies)
Resource policies (names, not URLs) applied to instances created from these properties. Note
that for MachineImage, this is not supported yet.
- Parameters:
resourcePolicies - resourcePolicies or null for none
-
getScheduling
public Scheduling getScheduling()
Specifies the scheduling options for the instances that are created from these properties.
- Returns:
- value or
null for none
-
setScheduling
public InstanceProperties setScheduling(Scheduling scheduling)
Specifies the scheduling options for the instances that are created from these properties.
- Parameters:
scheduling - scheduling or null for none
-
getServiceAccounts
public List<ServiceAccount> getServiceAccounts()
A list of service accounts with specified scopes. Access tokens for these service accounts are
available to the instances that are created from these properties. Use metadata queries to
obtain the access tokens for these instances.
- Returns:
- value or
null for none
-
setServiceAccounts
public InstanceProperties setServiceAccounts(List<ServiceAccount> serviceAccounts)
A list of service accounts with specified scopes. Access tokens for these service accounts are
available to the instances that are created from these properties. Use metadata queries to
obtain the access tokens for these instances.
- Parameters:
serviceAccounts - serviceAccounts or null for none
-
getShieldedInstanceConfig
public ShieldedInstanceConfig getShieldedInstanceConfig()
Note that for MachineImage, this is not supported yet.
- Returns:
- value or
null for none
-
setShieldedInstanceConfig
public InstanceProperties setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig)
Note that for MachineImage, this is not supported yet.
- Parameters:
shieldedInstanceConfig - shieldedInstanceConfig or null for none
-
getTags
public Tags getTags()
A list of tags to apply to the instances that are created from these properties. The tags
identify valid sources or targets for network firewalls. The setTags method can modify this
list of tags. Each tag within the list must comply with RFC1035.
- Returns:
- value or
null for none
-
setTags
public InstanceProperties setTags(Tags tags)
A list of tags to apply to the instances that are created from these properties. The tags
identify valid sources or targets for network firewalls. The setTags method can modify this
list of tags. Each tag within the list must comply with RFC1035.
- Parameters:
tags - tags or null for none
-
set
public InstanceProperties set(String fieldName,
Object value)
- Overrides:
set in class com.google.api.client.json.GenericJson
-
clone
public InstanceProperties clone()
- Overrides:
clone in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy