Modifier and Type | Method and Description |
---|---|
Instance.Builder |
addAllDisks(List<AttachedDisk> disks)
Array of disks associated with this instance.
|
Instance.Builder |
addAllGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
A list of the type and count of accelerator cards attached to the instance.
|
Instance.Builder |
addAllNetworkInterfaces(List<NetworkInterface> networkInterfaces)
An array of network configurations for this instance.
|
Instance.Builder |
addAllServiceAccounts(List<ServiceAccount> serviceAccounts)
A list of service accounts, with their specified scopes, authorized for this instance.
|
Instance.Builder |
addDisks(AttachedDisk disks)
Array of disks associated with this instance.
|
Instance.Builder |
addGuestAccelerators(AcceleratorConfig guestAccelerators)
A list of the type and count of accelerator cards attached to the instance.
|
Instance.Builder |
addNetworkInterfaces(NetworkInterface networkInterfaces)
An array of network configurations for this instance.
|
Instance.Builder |
addServiceAccounts(ServiceAccount serviceAccounts)
A list of service accounts, with their specified scopes, authorized for this instance.
|
Instance |
build() |
Instance.Builder |
clone() |
Boolean |
getCanIpForward()
Allows this instance to send and receive packets with non-matching destination or source IPs.
|
String |
getCpuPlatform()
[Output Only] The CPU platform used by this instance.
|
String |
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
|
Boolean |
getDeletionProtection()
Whether the resource should be protected against deletion.
|
String |
getDescription()
An optional description of this resource.
|
List<AttachedDisk> |
getDisksList()
Array of disks associated with this instance.
|
DisplayDevice |
getDisplayDevice()
Enables display device for the instance.
|
List<AcceleratorConfig> |
getGuestAcceleratorsList()
A list of the type and count of accelerator cards attached to the instance.
|
String |
getHostname()
Specifies the hostname of the instance.
|
String |
getId()
[Output Only] The unique identifier for the resource.
|
String |
getKind()
[Output Only] Type of the resource.
|
String |
getLabelFingerprint()
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
Map<String,String> |
getLabelsMap()
Labels to apply to this instance.
|
String |
getMachineType()
Full or partial URL of the machine type resource to use for this instance, in the format:
zones/zone/machineTypes/machine-type.
|
Metadata |
getMetadata()
The metadata key/value pairs assigned to this instance.
|
String |
getMinCpuPlatform()
Specifies a minimum CPU platform for the VM instance.
|
String |
getName()
The name of the resource, provided by the client when initially creating the resource.
|
List<NetworkInterface> |
getNetworkInterfacesList()
An array of network configurations for this instance.
|
ReservationAffinity |
getReservationAffinity()
Specifies the reservations that this instance can consume from.
|
Scheduling |
getScheduling()
Sets the scheduling options for this instance.
|
String |
getSelfLink()
[Output Only] Server-defined URL for this resource.
|
List<ServiceAccount> |
getServiceAccountsList()
A list of service accounts, with their specified scopes, authorized for this instance.
|
ShieldedInstanceConfig |
getShieldedInstanceConfig() |
ShieldedInstanceIntegrityPolicy |
getShieldedInstanceIntegrityPolicy() |
Boolean |
getStartRestricted()
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
|
String |
getStatus()
[Output Only] The status of the instance.
|
String |
getStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
|
Tags |
getTags()
Tags to apply to this instance.
|
String |
getZone()
[Output Only] URL of the zone where the instance resides.
|
Instance.Builder |
mergeFrom(Instance other) |
Instance.Builder |
putAllLabels(Map<String,String> labels)
Labels to apply to this instance.
|
Instance.Builder |
setCanIpForward(Boolean canIpForward)
Allows this instance to send and receive packets with non-matching destination or source IPs.
|
Instance.Builder |
setCpuPlatform(String cpuPlatform)
[Output Only] The CPU platform used by this instance.
|
Instance.Builder |
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
|
Instance.Builder |
setDeletionProtection(Boolean deletionProtection)
Whether the resource should be protected against deletion.
|
Instance.Builder |
setDescription(String description)
An optional description of this resource.
|
Instance.Builder |
setDisplayDevice(DisplayDevice displayDevice)
Enables display device for the instance.
|
Instance.Builder |
setHostname(String hostname)
Specifies the hostname of the instance.
|
Instance.Builder |
setId(String id)
[Output Only] The unique identifier for the resource.
|
Instance.Builder |
setKind(String kind)
[Output Only] Type of the resource.
|
Instance.Builder |
setLabelFingerprint(String labelFingerprint)
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
Instance.Builder |
setMachineType(String machineType)
Full or partial URL of the machine type resource to use for this instance, in the format:
zones/zone/machineTypes/machine-type.
|
Instance.Builder |
setMetadata(Metadata metadata)
The metadata key/value pairs assigned to this instance.
|
Instance.Builder |
setMinCpuPlatform(String minCpuPlatform)
Specifies a minimum CPU platform for the VM instance.
|
Instance.Builder |
setName(String name)
The name of the resource, provided by the client when initially creating the resource.
|
Instance.Builder |
setReservationAffinity(ReservationAffinity reservationAffinity)
Specifies the reservations that this instance can consume from.
|
Instance.Builder |
setScheduling(Scheduling scheduling)
Sets the scheduling options for this instance.
|
Instance.Builder |
setSelfLink(String selfLink)
[Output Only] Server-defined URL for this resource.
|
Instance.Builder |
setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig) |
Instance.Builder |
setShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy) |
Instance.Builder |
setStartRestricted(Boolean startRestricted)
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
|
Instance.Builder |
setStatus(String status)
[Output Only] The status of the instance.
|
Instance.Builder |
setStatusMessage(String statusMessage)
[Output Only] An optional, human-readable explanation of the status.
|
Instance.Builder |
setTags(Tags tags)
Tags to apply to this instance.
|
Instance.Builder |
setZone(String zone)
[Output Only] URL of the zone where the instance resides.
|
public Instance.Builder mergeFrom(Instance other)
public Boolean getCanIpForward()
public Instance.Builder setCanIpForward(Boolean canIpForward)
public String getCpuPlatform()
public Instance.Builder setCpuPlatform(String cpuPlatform)
public String getCreationTimestamp()
public Instance.Builder setCreationTimestamp(String creationTimestamp)
public Boolean getDeletionProtection()
public Instance.Builder setDeletionProtection(Boolean deletionProtection)
public String getDescription()
public Instance.Builder setDescription(String description)
public List<AttachedDisk> getDisksList()
public Instance.Builder addAllDisks(List<AttachedDisk> disks)
public Instance.Builder addDisks(AttachedDisk disks)
public DisplayDevice getDisplayDevice()
public Instance.Builder setDisplayDevice(DisplayDevice displayDevice)
public List<AcceleratorConfig> getGuestAcceleratorsList()
public Instance.Builder addAllGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
public Instance.Builder addGuestAccelerators(AcceleratorConfig guestAccelerators)
public String getHostname()
public Instance.Builder setHostname(String hostname)
public String getId()
public Instance.Builder setId(String id)
public String getKind()
public Instance.Builder setKind(String kind)
public String getLabelFingerprint()
To see the latest fingerprint, make get() request to the instance.
public Instance.Builder setLabelFingerprint(String labelFingerprint)
To see the latest fingerprint, make get() request to the instance.
public Map<String,String> getLabelsMap()
public Instance.Builder putAllLabels(Map<String,String> labels)
public String getMachineType()
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.
public Instance.Builder setMachineType(String machineType)
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.
public Metadata getMetadata()
public Instance.Builder setMetadata(Metadata metadata)
public String getMinCpuPlatform()
public Instance.Builder setMinCpuPlatform(String minCpuPlatform)
public String getName()
public Instance.Builder setName(String name)
public List<NetworkInterface> getNetworkInterfacesList()
public Instance.Builder addAllNetworkInterfaces(List<NetworkInterface> networkInterfaces)
public Instance.Builder addNetworkInterfaces(NetworkInterface networkInterfaces)
public ReservationAffinity getReservationAffinity()
public Instance.Builder setReservationAffinity(ReservationAffinity reservationAffinity)
public Scheduling getScheduling()
public Instance.Builder setScheduling(Scheduling scheduling)
public String getSelfLink()
public Instance.Builder setSelfLink(String selfLink)
public List<ServiceAccount> getServiceAccountsList()
Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
public Instance.Builder addAllServiceAccounts(List<ServiceAccount> serviceAccounts)
Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
public Instance.Builder addServiceAccounts(ServiceAccount serviceAccounts)
Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
public ShieldedInstanceConfig getShieldedInstanceConfig()
public Instance.Builder setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig)
public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy()
public Instance.Builder setShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy)
public Boolean getStartRestricted()
public Instance.Builder setStartRestricted(Boolean startRestricted)
public String getStatus()
public Instance.Builder setStatus(String status)
public String getStatusMessage()
public Instance.Builder setStatusMessage(String statusMessage)
public Tags getTags()
public Instance.Builder setTags(Tags tags)
public String getZone()
public Instance.Builder setZone(String zone)
public Instance build()
public Instance.Builder clone()
Copyright © 2019 Google LLC. All rights reserved.