Class InstanceProperties.Builder (1.74.0)

public static final class InstanceProperties.Builder extends GeneratedMessageV3.Builder<InstanceProperties.Builder> implements InstancePropertiesOrBuilder

Protobuf type google.cloud.compute.v1.InstanceProperties

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllDisks(Iterable<? extends AttachedDisk> values)

public InstanceProperties.Builder addAllDisks(Iterable<? extends AttachedDisk> values)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.AttachedDisk>
Returns
Type Description
InstanceProperties.Builder

addAllGuestAccelerators(Iterable<? extends AcceleratorConfig> values)

public InstanceProperties.Builder addAllGuestAccelerators(Iterable<? extends AcceleratorConfig> values)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.AcceleratorConfig>
Returns
Type Description
InstanceProperties.Builder

addAllNetworkInterfaces(Iterable<? extends NetworkInterface> values)

public InstanceProperties.Builder addAllNetworkInterfaces(Iterable<? extends NetworkInterface> values)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.NetworkInterface>
Returns
Type Description
InstanceProperties.Builder

addAllResourcePolicies(Iterable<String> values)

public InstanceProperties.Builder addAllResourcePolicies(Iterable<String> values)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
Name Description
values Iterable<String>

The resourcePolicies to add.

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

addAllServiceAccounts(Iterable<? extends ServiceAccount> values)

public InstanceProperties.Builder addAllServiceAccounts(Iterable<? extends ServiceAccount> values)

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.ServiceAccount>
Returns
Type Description
InstanceProperties.Builder

addDisks(AttachedDisk value)

public InstanceProperties.Builder addDisks(AttachedDisk value)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
Name Description
value AttachedDisk
Returns
Type Description
InstanceProperties.Builder

addDisks(AttachedDisk.Builder builderForValue)

public InstanceProperties.Builder addDisks(AttachedDisk.Builder builderForValue)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
Name Description
builderForValue AttachedDisk.Builder
Returns
Type Description
InstanceProperties.Builder

addDisks(int index, AttachedDisk value)

public InstanceProperties.Builder addDisks(int index, AttachedDisk value)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameters
Name Description
index int
value AttachedDisk
Returns
Type Description
InstanceProperties.Builder

addDisks(int index, AttachedDisk.Builder builderForValue)

public InstanceProperties.Builder addDisks(int index, AttachedDisk.Builder builderForValue)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameters
Name Description
index int
builderForValue AttachedDisk.Builder
Returns
Type Description
InstanceProperties.Builder

addDisksBuilder()

public AttachedDisk.Builder addDisksBuilder()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
Type Description
AttachedDisk.Builder

addDisksBuilder(int index)

public AttachedDisk.Builder addDisksBuilder(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
Name Description
index int
Returns
Type Description
AttachedDisk.Builder

addGuestAccelerators(AcceleratorConfig value)

public InstanceProperties.Builder addGuestAccelerators(AcceleratorConfig value)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
Name Description
value AcceleratorConfig
Returns
Type Description
InstanceProperties.Builder

addGuestAccelerators(AcceleratorConfig.Builder builderForValue)

public InstanceProperties.Builder addGuestAccelerators(AcceleratorConfig.Builder builderForValue)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
Name Description
builderForValue AcceleratorConfig.Builder
Returns
Type Description
InstanceProperties.Builder

addGuestAccelerators(int index, AcceleratorConfig value)

public InstanceProperties.Builder addGuestAccelerators(int index, AcceleratorConfig value)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameters
Name Description
index int
value AcceleratorConfig
Returns
Type Description
InstanceProperties.Builder

addGuestAccelerators(int index, AcceleratorConfig.Builder builderForValue)

public InstanceProperties.Builder addGuestAccelerators(int index, AcceleratorConfig.Builder builderForValue)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameters
Name Description
index int
builderForValue AcceleratorConfig.Builder
Returns
Type Description
InstanceProperties.Builder

addGuestAcceleratorsBuilder()

public AcceleratorConfig.Builder addGuestAcceleratorsBuilder()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
Type Description
AcceleratorConfig.Builder

addGuestAcceleratorsBuilder(int index)

public AcceleratorConfig.Builder addGuestAcceleratorsBuilder(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
Name Description
index int
Returns
Type Description
AcceleratorConfig.Builder

addNetworkInterfaces(NetworkInterface value)

public InstanceProperties.Builder addNetworkInterfaces(NetworkInterface value)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
Name Description
value NetworkInterface
Returns
Type Description
InstanceProperties.Builder

addNetworkInterfaces(NetworkInterface.Builder builderForValue)

public InstanceProperties.Builder addNetworkInterfaces(NetworkInterface.Builder builderForValue)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
Name Description
builderForValue NetworkInterface.Builder
Returns
Type Description
InstanceProperties.Builder

addNetworkInterfaces(int index, NetworkInterface value)

public InstanceProperties.Builder addNetworkInterfaces(int index, NetworkInterface value)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameters
Name Description
index int
value NetworkInterface
Returns
Type Description
InstanceProperties.Builder

addNetworkInterfaces(int index, NetworkInterface.Builder builderForValue)

public InstanceProperties.Builder addNetworkInterfaces(int index, NetworkInterface.Builder builderForValue)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameters
Name Description
index int
builderForValue NetworkInterface.Builder
Returns
Type Description
InstanceProperties.Builder

addNetworkInterfacesBuilder()

public NetworkInterface.Builder addNetworkInterfacesBuilder()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
Type Description
NetworkInterface.Builder

addNetworkInterfacesBuilder(int index)

public NetworkInterface.Builder addNetworkInterfacesBuilder(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
Name Description
index int
Returns
Type Description
NetworkInterface.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public InstanceProperties.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
InstanceProperties.Builder
Overrides

addResourcePolicies(String value)

public InstanceProperties.Builder addResourcePolicies(String value)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
Name Description
value String

The resourcePolicies to add.

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

addResourcePoliciesBytes(ByteString value)

public InstanceProperties.Builder addResourcePoliciesBytes(ByteString value)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
Name Description
value ByteString

The bytes of the resourcePolicies to add.

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

addServiceAccounts(ServiceAccount value)

public InstanceProperties.Builder addServiceAccounts(ServiceAccount value)

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
Name Description
value ServiceAccount
Returns
Type Description
InstanceProperties.Builder

addServiceAccounts(ServiceAccount.Builder builderForValue)

public InstanceProperties.Builder addServiceAccounts(ServiceAccount.Builder builderForValue)

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
Name Description
builderForValue ServiceAccount.Builder
Returns
Type Description
InstanceProperties.Builder

addServiceAccounts(int index, ServiceAccount value)

public InstanceProperties.Builder addServiceAccounts(int index, ServiceAccount value)

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameters
Name Description
index int
value ServiceAccount
Returns
Type Description
InstanceProperties.Builder

addServiceAccounts(int index, ServiceAccount.Builder builderForValue)

public InstanceProperties.Builder addServiceAccounts(int index, ServiceAccount.Builder builderForValue)

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameters
Name Description
index int
builderForValue ServiceAccount.Builder
Returns
Type Description
InstanceProperties.Builder

addServiceAccountsBuilder()

public ServiceAccount.Builder addServiceAccountsBuilder()

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
Type Description
ServiceAccount.Builder

addServiceAccountsBuilder(int index)

public ServiceAccount.Builder addServiceAccountsBuilder(int index)

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
Name Description
index int
Returns
Type Description
ServiceAccount.Builder

build()

public InstanceProperties build()
Returns
Type Description
InstanceProperties

buildPartial()

public InstanceProperties buildPartial()
Returns
Type Description
InstanceProperties

clear()

public InstanceProperties.Builder clear()
Returns
Type Description
InstanceProperties.Builder
Overrides

clearAdvancedMachineFeatures()

public InstanceProperties.Builder clearAdvancedMachineFeatures()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
Type Description
InstanceProperties.Builder

clearCanIpForward()

public InstanceProperties.Builder clearCanIpForward()

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.

optional bool can_ip_forward = 467731324;

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

clearConfidentialInstanceConfig()

public InstanceProperties.Builder clearConfidentialInstanceConfig()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
Type Description
InstanceProperties.Builder

clearDescription()

public InstanceProperties.Builder clearDescription()

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

clearDisks()

public InstanceProperties.Builder clearDisks()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
Type Description
InstanceProperties.Builder

clearField(Descriptors.FieldDescriptor field)

public InstanceProperties.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
InstanceProperties.Builder
Overrides

clearGuestAccelerators()

public InstanceProperties.Builder clearGuestAccelerators()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
Type Description
InstanceProperties.Builder

clearKeyRevocationActionType()

public InstanceProperties.Builder clearKeyRevocationActionType()

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

clearLabels()

public InstanceProperties.Builder clearLabels()
Returns
Type Description
InstanceProperties.Builder

clearMachineType()

public InstanceProperties.Builder clearMachineType()

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.

optional string machine_type = 227711026;

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

clearMetadata()

public InstanceProperties.Builder clearMetadata()

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.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
Type Description
InstanceProperties.Builder

clearMinCpuPlatform()

public InstanceProperties.Builder clearMinCpuPlatform()

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.

optional string min_cpu_platform = 242912759;

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

clearNetworkInterfaces()

public InstanceProperties.Builder clearNetworkInterfaces()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
Type Description
InstanceProperties.Builder

clearNetworkPerformanceConfig()

public InstanceProperties.Builder clearNetworkPerformanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
Type Description
InstanceProperties.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public InstanceProperties.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
InstanceProperties.Builder
Overrides

clearPrivateIpv6GoogleAccess()

public InstanceProperties.Builder clearPrivateIpv6GoogleAccess()

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. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

clearReservationAffinity()

public InstanceProperties.Builder clearReservationAffinity()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
Type Description
InstanceProperties.Builder

clearResourceManagerTags()

public InstanceProperties.Builder clearResourceManagerTags()
Returns
Type Description
InstanceProperties.Builder

clearResourcePolicies()

public InstanceProperties.Builder clearResourcePolicies()

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Returns
Type Description
InstanceProperties.Builder

This builder for chaining.

clearScheduling()

public InstanceProperties.Builder clearScheduling()

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Returns
Type Description
InstanceProperties.Builder

clearServiceAccounts()

public InstanceProperties.Builder clearServiceAccounts()

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.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
Type Description
InstanceProperties.Builder

clearShieldedInstanceConfig()

public InstanceProperties.Builder clearShieldedInstanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Returns
Type Description
InstanceProperties.Builder

clearTags()

public InstanceProperties.Builder clearTags()

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.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Returns
Type Description
InstanceProperties.Builder

clone()

public InstanceProperties.Builder clone()
Returns
Type Description
InstanceProperties.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameter
Name Description
key String
Returns
Type Description
boolean

containsResourceManagerTags(String key)

public boolean containsResourceManagerTags(String key)

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.

map<string, string> resource_manager_tags = 377671164;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAdvancedMachineFeatures()

public AdvancedMachineFeatures getAdvancedMachineFeatures()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
Type Description
AdvancedMachineFeatures

The advancedMachineFeatures.

getAdvancedMachineFeaturesBuilder()

public AdvancedMachineFeatures.Builder getAdvancedMachineFeaturesBuilder()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
Type Description
AdvancedMachineFeatures.Builder

getAdvancedMachineFeaturesOrBuilder()

public AdvancedMachineFeaturesOrBuilder getAdvancedMachineFeaturesOrBuilder()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
Type Description
AdvancedMachineFeaturesOrBuilder

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.

optional bool can_ip_forward = 467731324;

Returns
Type Description
boolean

The canIpForward.

getConfidentialInstanceConfig()

public ConfidentialInstanceConfig getConfidentialInstanceConfig()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
Type Description
ConfidentialInstanceConfig

The confidentialInstanceConfig.

getConfidentialInstanceConfigBuilder()

public ConfidentialInstanceConfig.Builder getConfidentialInstanceConfigBuilder()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
Type Description
ConfidentialInstanceConfig.Builder

getConfidentialInstanceConfigOrBuilder()

public ConfidentialInstanceConfigOrBuilder getConfidentialInstanceConfigOrBuilder()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
Type Description
ConfidentialInstanceConfigOrBuilder

getDefaultInstanceForType()

public InstanceProperties getDefaultInstanceForType()
Returns
Type Description
InstanceProperties

getDescription()

public String getDescription()

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisks(int index)

public AttachedDisk getDisks(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
Name Description
index int
Returns
Type Description
AttachedDisk

getDisksBuilder(int index)

public AttachedDisk.Builder getDisksBuilder(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
Name Description
index int
Returns
Type Description
AttachedDisk.Builder

getDisksBuilderList()

public List<AttachedDisk.Builder> getDisksBuilderList()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
Type Description
List<Builder>

getDisksCount()

public int getDisksCount()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
Type Description
int

getDisksList()

public List<AttachedDisk> getDisksList()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
Type Description
List<AttachedDisk>

getDisksOrBuilder(int index)

public AttachedDiskOrBuilder getDisksOrBuilder(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
Name Description
index int
Returns
Type Description
AttachedDiskOrBuilder

getDisksOrBuilderList()

public List<? extends AttachedDiskOrBuilder> getDisksOrBuilderList()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.AttachedDiskOrBuilder>

getGuestAccelerators(int index)

public AcceleratorConfig getGuestAccelerators(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
Name Description
index int
Returns
Type Description
AcceleratorConfig

getGuestAcceleratorsBuilder(int index)

public AcceleratorConfig.Builder getGuestAcceleratorsBuilder(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
Name Description
index int
Returns
Type Description
AcceleratorConfig.Builder

getGuestAcceleratorsBuilderList()

public List<AcceleratorConfig.Builder> getGuestAcceleratorsBuilderList()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
Type Description
List<Builder>

getGuestAcceleratorsCount()

public int getGuestAcceleratorsCount()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
Type Description
int

getGuestAcceleratorsList()

public List<AcceleratorConfig> getGuestAcceleratorsList()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
Type Description
List<AcceleratorConfig>

getGuestAcceleratorsOrBuilder(int index)

public AcceleratorConfigOrBuilder getGuestAcceleratorsOrBuilder(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
Name Description
index int
Returns
Type Description
AcceleratorConfigOrBuilder

getGuestAcceleratorsOrBuilderList()

public List<? extends AcceleratorConfigOrBuilder> getGuestAcceleratorsOrBuilderList()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.AcceleratorConfigOrBuilder>

getKeyRevocationActionType()

public String getKeyRevocationActionType()

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Returns
Type Description
String

The keyRevocationActionType.

getKeyRevocationActionTypeBytes()

public ByteString getKeyRevocationActionTypeBytes()

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Returns
Type Description
ByteString

The bytes for keyRevocationActionType.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameter
Name Description
key String
Returns
Type Description
String

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.

optional string machine_type = 227711026;

Returns
Type Description
String

The machineType.

getMachineTypeBytes()

public ByteString getMachineTypeBytes()

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.

optional string machine_type = 227711026;

Returns
Type Description
ByteString

The bytes for machineType.

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.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
Type Description
Metadata

The metadata.

getMetadataBuilder()

public Metadata.Builder getMetadataBuilder()

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.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
Type Description
Metadata.Builder

getMetadataOrBuilder()

public MetadataOrBuilder getMetadataOrBuilder()

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.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
Type Description
MetadataOrBuilder

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.

optional string min_cpu_platform = 242912759;

Returns
Type Description
String

The minCpuPlatform.

getMinCpuPlatformBytes()

public ByteString getMinCpuPlatformBytes()

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.

optional string min_cpu_platform = 242912759;

Returns
Type Description
ByteString

The bytes for minCpuPlatform.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableResourceManagerTags() (deprecated)

public Map<String,String> getMutableResourceManagerTags()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getNetworkInterfaces(int index)

public NetworkInterface getNetworkInterfaces(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
Name Description
index int
Returns
Type Description
NetworkInterface

getNetworkInterfacesBuilder(int index)

public NetworkInterface.Builder getNetworkInterfacesBuilder(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
Name Description
index int
Returns
Type Description
NetworkInterface.Builder

getNetworkInterfacesBuilderList()

public List<NetworkInterface.Builder> getNetworkInterfacesBuilderList()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
Type Description
List<Builder>

getNetworkInterfacesCount()

public int getNetworkInterfacesCount()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
Type Description
int

getNetworkInterfacesList()

public List<NetworkInterface> getNetworkInterfacesList()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
Type Description
List<NetworkInterface>

getNetworkInterfacesOrBuilder(int index)

public NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
Name Description
index int
Returns
Type Description
NetworkInterfaceOrBuilder

getNetworkInterfacesOrBuilderList()

public List<? extends NetworkInterfaceOrBuilder> getNetworkInterfacesOrBuilderList()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.NetworkInterfaceOrBuilder>

getNetworkPerformanceConfig()

public NetworkPerformanceConfig getNetworkPerformanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
Type Description
NetworkPerformanceConfig

The networkPerformanceConfig.

getNetworkPerformanceConfigBuilder()

public NetworkPerformanceConfig.Builder getNetworkPerformanceConfigBuilder()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
Type Description
NetworkPerformanceConfig.Builder

getNetworkPerformanceConfigOrBuilder()

public NetworkPerformanceConfigOrBuilder getNetworkPerformanceConfigOrBuilder()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
Type Description
NetworkPerformanceConfigOrBuilder

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. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
Type Description
String

The privateIpv6GoogleAccess.

getPrivateIpv6GoogleAccessBytes()

public ByteString getPrivateIpv6GoogleAccessBytes()

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. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
Type Description
ByteString

The bytes for privateIpv6GoogleAccess.

getReservationAffinity()

public ReservationAffinity getReservationAffinity()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
Type Description
ReservationAffinity

The reservationAffinity.

getReservationAffinityBuilder()

public ReservationAffinity.Builder getReservationAffinityBuilder()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
Type Description
ReservationAffinity.Builder

getReservationAffinityOrBuilder()

public ReservationAffinityOrBuilder getReservationAffinityOrBuilder()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
Type Description
ReservationAffinityOrBuilder

getResourceManagerTags() (deprecated)

public Map<String,String> getResourceManagerTags()
Returns
Type Description
Map<String,String>

getResourceManagerTagsCount()

public int getResourceManagerTagsCount()

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.

map<string, string> resource_manager_tags = 377671164;

Returns
Type Description
int

getResourceManagerTagsMap()

public Map<String,String> getResourceManagerTagsMap()

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.

map<string, string> resource_manager_tags = 377671164;

Returns
Type Description
Map<String,String>

getResourceManagerTagsOrDefault(String key, String defaultValue)

public String getResourceManagerTagsOrDefault(String key, String defaultValue)

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.

map<string, string> resource_manager_tags = 377671164;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getResourceManagerTagsOrThrow(String key)

public String getResourceManagerTagsOrThrow(String key)

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.

map<string, string> resource_manager_tags = 377671164;

Parameter
Name Description
key String
Returns
Type Description
String

getResourcePolicies(int index)

public String getResourcePolicies(int index)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The resourcePolicies at the given index.

getResourcePoliciesBytes(int index)

public ByteString getResourcePoliciesBytes(int index)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the resourcePolicies at the given index.

getResourcePoliciesCount()

public int getResourcePoliciesCount()

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Returns
Type Description
int

The count of resourcePolicies.

getResourcePoliciesList()

public ProtocolStringList getResourcePoliciesList()

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Returns
Type Description
ProtocolStringList

A list containing the resourcePolicies.

getScheduling()

public Scheduling getScheduling()

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Returns
Type Description
Scheduling

The scheduling.

getSchedulingBuilder()

public Scheduling.