Class Instance (1.78.0)

public final class Instance extends GeneratedMessageV3 implements InstanceOrBuilder

Represents an Instance resource. An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances.

Protobuf type google.cloud.compute.v1.Instance

Implements

InstanceOrBuilder

Static Fields

ADVANCED_MACHINE_FEATURES_FIELD_NUMBER

public static final int ADVANCED_MACHINE_FEATURES_FIELD_NUMBER
Field Value
Type Description
int

CAN_IP_FORWARD_FIELD_NUMBER

public static final int CAN_IP_FORWARD_FIELD_NUMBER
Field Value
Type Description
int

CONFIDENTIAL_INSTANCE_CONFIG_FIELD_NUMBER

public static final int CONFIDENTIAL_INSTANCE_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

CPU_PLATFORM_FIELD_NUMBER

public static final int CPU_PLATFORM_FIELD_NUMBER
Field Value
Type Description
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

DELETION_PROTECTION_FIELD_NUMBER

public static final int DELETION_PROTECTION_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISKS_FIELD_NUMBER

public static final int DISKS_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_DEVICE_FIELD_NUMBER

public static final int DISPLAY_DEVICE_FIELD_NUMBER
Field Value
Type Description
int

FINGERPRINT_FIELD_NUMBER

public static final int FINGERPRINT_FIELD_NUMBER
Field Value
Type Description
int

GUEST_ACCELERATORS_FIELD_NUMBER

public static final int GUEST_ACCELERATORS_FIELD_NUMBER
Field Value
Type Description
int

HOSTNAME_FIELD_NUMBER

public static final int HOSTNAME_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

INSTANCE_ENCRYPTION_KEY_FIELD_NUMBER

public static final int INSTANCE_ENCRYPTION_KEY_FIELD_NUMBER
Field Value
Type Description
int

KEY_REVOCATION_ACTION_TYPE_FIELD_NUMBER

public static final int KEY_REVOCATION_ACTION_TYPE_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

LABEL_FINGERPRINT_FIELD_NUMBER

public static final int LABEL_FINGERPRINT_FIELD_NUMBER
Field Value
Type Description
int

LAST_START_TIMESTAMP_FIELD_NUMBER

public static final int LAST_START_TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

LAST_STOP_TIMESTAMP_FIELD_NUMBER

public static final int LAST_STOP_TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

LAST_SUSPENDED_TIMESTAMP_FIELD_NUMBER

public static final int LAST_SUSPENDED_TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

MACHINE_TYPE_FIELD_NUMBER

public static final int MACHINE_TYPE_FIELD_NUMBER
Field Value
Type Description
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
Type Description
int

MIN_CPU_PLATFORM_FIELD_NUMBER

public static final int MIN_CPU_PLATFORM_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NETWORK_INTERFACES_FIELD_NUMBER

public static final int NETWORK_INTERFACES_FIELD_NUMBER
Field Value
Type Description
int

NETWORK_PERFORMANCE_CONFIG_FIELD_NUMBER

public static final int NETWORK_PERFORMANCE_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

PARAMS_FIELD_NUMBER

public static final int PARAMS_FIELD_NUMBER
Field Value
Type Description
int

PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER

public static final int PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER
Field Value
Type Description
int

RESERVATION_AFFINITY_FIELD_NUMBER

public static final int RESERVATION_AFFINITY_FIELD_NUMBER
Field Value
Type Description
int

RESOURCE_POLICIES_FIELD_NUMBER

public static final int RESOURCE_POLICIES_FIELD_NUMBER
Field Value
Type Description
int

RESOURCE_STATUS_FIELD_NUMBER

public static final int RESOURCE_STATUS_FIELD_NUMBER
Field Value
Type Description
int

SATISFIES_PZI_FIELD_NUMBER

public static final int SATISFIES_PZI_FIELD_NUMBER
Field Value
Type Description
int

SATISFIES_PZS_FIELD_NUMBER

public static final int SATISFIES_PZS_FIELD_NUMBER
Field Value
Type Description
int

SCHEDULING_FIELD_NUMBER

public static final int SCHEDULING_FIELD_NUMBER
Field Value
Type Description
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
Type Description
int

SERVICE_ACCOUNTS_FIELD_NUMBER

public static final int SERVICE_ACCOUNTS_FIELD_NUMBER
Field Value
Type Description
int

SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER

public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

SHIELDED_INSTANCE_INTEGRITY_POLICY_FIELD_NUMBER

public static final int SHIELDED_INSTANCE_INTEGRITY_POLICY_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_MACHINE_IMAGE_ENCRYPTION_KEY_FIELD_NUMBER

public static final int SOURCE_MACHINE_IMAGE_ENCRYPTION_KEY_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_MACHINE_IMAGE_FIELD_NUMBER

public static final int SOURCE_MACHINE_IMAGE_FIELD_NUMBER
Field Value
Type Description
int

START_RESTRICTED_FIELD_NUMBER

public static final int START_RESTRICTED_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
Type Description
int

STATUS_MESSAGE_FIELD_NUMBER

public static final int STATUS_MESSAGE_FIELD_NUMBER
Field Value
Type Description
int

TAGS_FIELD_NUMBER

public static final int TAGS_FIELD_NUMBER
Field Value
Type Description
int

ZONE_FIELD_NUMBER

public static final int ZONE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Instance getDefaultInstance()
Returns
Type Description
Instance

getDescriptor()

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

newBuilder()

public static Instance.Builder newBuilder()
Returns
Type Description
Instance.Builder

newBuilder(Instance prototype)

public static Instance.Builder newBuilder(Instance prototype)
Parameter
Name Description
prototype Instance
Returns
Type Description
Instance.Builder

parseDelimitedFrom(InputStream input)

public static Instance parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Instance
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Instance parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Instance
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Instance parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Instance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Instance parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Instance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Instance parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Instance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Instance parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Instance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Instance parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Instance
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Instance parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Instance
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Instance parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Instance
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Instance parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Instance
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Instance parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Instance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Instance parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Instance
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Instance> parser()
Returns
Type Description
Parser<Instance>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Labels to apply to this instance. These can be later modified by the setLabels method.

map<string, string> labels = 500195327;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAdvancedMachineFeatures()

public AdvancedMachineFeatures getAdvancedMachineFeatures()

Controls for advanced machine-related behavior features.

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

Returns
Type Description
AdvancedMachineFeatures

The advancedMachineFeatures.

getAdvancedMachineFeaturesOrBuilder()

public AdvancedMachineFeaturesOrBuilder getAdvancedMachineFeaturesOrBuilder()

Controls for advanced machine-related behavior features.

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

Returns
Type Description
AdvancedMachineFeaturesOrBuilder

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 .

optional bool can_ip_forward = 467731324;

Returns
Type Description
boolean

The canIpForward.

getConfidentialInstanceConfig()

public ConfidentialInstanceConfig getConfidentialInstanceConfig()

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

Returns
Type Description
ConfidentialInstanceConfig

The confidentialInstanceConfig.

getConfidentialInstanceConfigOrBuilder()

public ConfidentialInstanceConfigOrBuilder getConfidentialInstanceConfigOrBuilder()

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

Returns
Type Description
ConfidentialInstanceConfigOrBuilder

getCpuPlatform()

public String getCpuPlatform()

[Output Only] The CPU platform used by this instance.

optional string cpu_platform = 410285354;

Returns
Type Description
String

The cpuPlatform.

getCpuPlatformBytes()

public ByteString getCpuPlatformBytes()

[Output Only] The CPU platform used by this instance.

optional string cpu_platform = 410285354;

Returns
Type Description
ByteString

The bytes for cpuPlatform.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public Instance getDefaultInstanceForType()
Returns
Type Description
Instance

getDeletionProtection()

public boolean getDeletionProtection()

Whether the resource should be protected against deletion.

optional bool deletion_protection = 458014698;

Returns
Type Description
boolean

The deletionProtection.

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
Type Description
ByteString

The bytes for description.

getDisks(int index)

public AttachedDisk getDisks(int index)

Array of disks associated with this instance. Persistent disks must be created before you can assign them.

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

Parameter
Name Description
index int
Returns
Type Description
AttachedDisk

getDisksCount()

public int getDisksCount()

Array of disks associated with this instance. Persistent disks must be created before you can assign them.

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

Returns
Type Description
int

getDisksList()

public List<AttachedDisk> getDisksList()

Array of disks associated with this instance. Persistent disks must be created before you can assign them.

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

Returns
Type Description
List<AttachedDisk>

getDisksOrBuilder(int index)

public AttachedDiskOrBuilder getDisksOrBuilder(int index)

Array of disks associated with this instance. Persistent disks must be created before you can assign them.

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

Parameter
Name Description
index int
Returns
Type Description
AttachedDiskOrBuilder

getDisksOrBuilderList()

public List<? extends AttachedDiskOrBuilder> getDisksOrBuilderList()

Array of disks associated with this instance. Persistent disks must be created before you can assign them.

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

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

getDisplayDevice()

public DisplayDevice getDisplayDevice()

Enables display device for the instance.

optional .google.cloud.compute.v1.DisplayDevice display_device = 258933875;

Returns
Type Description
DisplayDevice

The displayDevice.

getDisplayDeviceOrBuilder()

public DisplayDeviceOrBuilder getDisplayDeviceOrBuilder()

Enables display device for the instance.

optional .google.cloud.compute.v1.DisplayDevice display_device = 258933875;

Returns
Type Description
DisplayDeviceOrBuilder

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.

optional string fingerprint = 234678500;

Returns
Type Description
String

The fingerprint.

getFingerprintBytes()

public ByteString getFingerprintBytes()

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.

optional string fingerprint = 234678500;

Returns
Type Description
ByteString

The bytes for fingerprint.

getGuestAccelerators(int index)

public AcceleratorConfig getGuestAccelerators(int index)

A list of the type and count of accelerator cards attached to the instance.

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

Parameter
Name Description
index int
Returns
Type Description
AcceleratorConfig

getGuestAcceleratorsCount()

public int getGuestAcceleratorsCount()

A list of the type and count of accelerator cards attached to the instance.

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

Returns
Type Description
int

getGuestAcceleratorsList()

public List<AcceleratorConfig> getGuestAcceleratorsList()

A list of the type and count of accelerator cards attached to the instance.

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 the type and count of accelerator cards attached to the instance.

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 the type and count of accelerator cards attached to the instance.

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

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

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.

optional string hostname = 237067315;

Returns
Type Description
String

The hostname.

getHostnameBytes()

public ByteString getHostnameBytes()

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.

optional string hostname = 237067315;

Returns
Type Description
ByteString

The bytes for hostname.

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
long

The id.

getInstanceEncryptionKey()

public CustomerEncryptionKey getInstanceEncryptionKey()

Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.

optional .google.cloud.compute.v1.CustomerEncryptionKey instance_encryption_key = 64741517;

Returns
Type Description
CustomerEncryptionKey

The instanceEncryptionKey.

getInstanceEncryptionKeyOrBuilder()

public CustomerEncryptionKeyOrBuilder getInstanceEncryptionKeyOrBuilder()

Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.

optional .google.cloud.compute.v1.CustomerEncryptionKey instance_encryption_key = 64741517;

Returns
Type Description
CustomerEncryptionKeyOrBuilder

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.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#instance for instances.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#instance for instances.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

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.

optional string label_fingerprint = 178124825;

Returns
Type Description
String

The labelFingerprint.

getLabelFingerprintBytes()

public ByteString getLabelFingerprintBytes()

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.

optional string label_fingerprint = 178124825;

Returns
Type Description
ByteString

The bytes for labelFingerprint.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels to apply to this instance. These can be later modified by the setLabels method.

map<string, string> labels = 500195327;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels to apply to this instance. These can be later modified by the setLabels method.

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 this instance. These can be later modified by the setLabels method.

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 this instance. These can be later modified by the setLabels method.

map<string, string> labels = 500195327;

Parameter
Name Description
key String
Returns
Type Description
String

getLastStartTimestamp()

public String getLastStartTimestamp()

[Output Only] Last start timestamp in RFC3339 text format.

optional string last_start_timestamp = 443830736;

Returns
Type Description
String

The lastStartTimestamp.

getLastStartTimestampBytes()

public ByteString getLastStartTimestampBytes()

[Output Only] Last start timestamp in RFC3339 text format.

optional string last_start_timestamp = 443830736;

Returns
Type Description
ByteString

The bytes for lastStartTimestamp.

getLastStopTimestamp()

public String getLastStopTimestamp()

[Output Only] Last stop timestamp in RFC3339 text format.

optional string last_stop_timestamp = 412823010;

Returns
Type Description
String

The lastStopTimestamp.

getLastStopTimestampBytes()

public ByteString getLastStopTimestampBytes()

[Output Only] Last stop timestamp in RFC3339 text format.

optional string last_stop_timestamp = 412823010;

Returns
Type Description
ByteString

The bytes for lastStopTimestamp.

getLastSuspendedTimestamp()

public String getLastSuspendedTimestamp()

[Output Only] Last suspended timestamp in RFC3339 text format.

optional string last_suspended_timestamp = 356275337;

Returns
Type Description
String

The lastSuspendedTimestamp.

getLastSuspendedTimestampBytes()

public ByteString getLastSuspendedTimestampBytes()

[Output Only] Last suspended timestamp in RFC3339 text format.

optional string last_suspended_timestamp = 356275337;

Returns
Type Description
ByteString

The bytes for lastSuspendedTimestamp.

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.

optional string machine_type = 227711026;

Returns
Type Description
String

The machineType.

getMachineTypeBytes()

public ByteString getMachineTypeBytes()

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.

optional string machine_type = 227711026;

Returns
Type Description
ByteString

The bytes for machineType.

getMetadata()

public Metadata getMetadata()

The metadata key/value pairs assigned to this instance. This includes metadata keys that were explicitly defined for the instance.

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

Returns
Type Description
Metadata

The metadata.

getMetadataOrBuilder()

public MetadataOrBuilder getMetadataOrBuilder()

The metadata key/value pairs assigned to this instance. This includes metadata keys that were explicitly defined for the instance.

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

Returns
Type Description
MetadataOrBuilder

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".

optional string min_cpu_platform = 242912759;

Returns
Type Description
String

The minCpuPlatform.

getMinCpuPlatformBytes()

public ByteString getMinCpuPlatformBytes()

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".

optional string min_cpu_platform = 242912759;

Returns
Type Description
ByteString

The bytes for minCpuPlatform.

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? 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.

optional string name = 3373707;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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? 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.

optional string name = 3373707;

Returns
Type Description
ByteString

The bytes for name.

getNetworkInterfaces(int index)

public NetworkInterface getNetworkInterfaces(int index)

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.

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

Parameter
Name Description
index int
Returns
Type Description
NetworkInterface

getNetworkInterfacesCount()

public int getNetworkInterfacesCount()

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.

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

Returns
Type Description
int

getNetworkInterfacesList()

public List<NetworkInterface> getNetworkInterfacesList()

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.

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 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.

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 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.

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

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

getNetworkPerformanceConfig()

public NetworkPerformanceConfig getNetworkPerformanceConfig()

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

Returns
Type Description
NetworkPerformanceConfig

The networkPerformanceConfig.

getNetworkPerformanceConfigOrBuilder()

public NetworkPerformanceConfigOrBuilder getNetworkPerformanceConfigOrBuilder()

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

Returns
Type Description
NetworkPerformanceConfigOrBuilder

getParams()

public InstanceParams getParams()

Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.

optional .google.cloud.compute.v1.InstanceParams params = 78313862;

Returns
Type Description
InstanceParams

The params.

getParamsOrBuilder()

public InstanceParamsOrBuilder getParamsOrBuilder()

Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.

optional .google.cloud.compute.v1.InstanceParams params = 78313862;

Returns
Type Description
InstanceParamsOrBuilder

getParserForType()

public Parser<Instance> getParserForType()
Returns
Type Description
Parser<Instance>
Overrides

getPrivateIpv6GoogleAccess()

public String getPrivateIpv6GoogleAccess()

The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. 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 the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. 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 this instance can consume from.

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

Returns
Type Description
ReservationAffinity

The reservationAffinity.

getReservationAffinityOrBuilder()

public ReservationAffinityOrBuilder getReservationAffinityOrBuilder()

Specifies the reservations that this instance can consume from.

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

Returns
Type Description
ReservationAffinityOrBuilder

getResourcePolicies(int index)

public String getResourcePolicies(int index)

Resource policies applied to this instance.

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 applied to this instance.

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 applied to this instance.

repeated string resource_policies = 22220385;

Returns
Type Description
int

The count of resourcePolicies.

getResourcePoliciesList()

public ProtocolStringList getResourcePoliciesList()

Resource policies applied to this instance.

repeated string resource_policies = 22220385;

Returns
Type Description
ProtocolStringList

A list containing the resourcePolicies.

getResourceStatus()

public ResourceStatus getResourceStatus()

[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field.

optional .google.cloud.compute.v1.ResourceStatus resource_status = 249429315;

Returns
Type Description
ResourceStatus

The resourceStatus.

getResourceStatusOrBuilder()

public ResourceStatusOrBuilder getResourceStatusOrBuilder()

[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field.