public static class Instance.Builder extends InstanceInfo.Builder
Instance
objects.Modifier and Type | Method and Description |
---|---|
Instance |
build()
Creates an
InstanceInfo object. |
Instance.Builder |
setAttachedDisks(AttachedDisk... attachedDisks)
Sets a list of disks to attach to the instance.
|
Instance.Builder |
setAttachedDisks(List<AttachedDisk> attachedDisks)
Sets a list of disks to attach to the instance.
|
Instance.Builder |
setCanIpForward(Boolean canIpForward)
Sets whether to allow this instance to send and receive packets with non-matching destination
or source IPs.
|
Instance.Builder |
setDescription(String description)
Sets an optional description of this Google Compute Engine instance.
|
Instance.Builder |
setInstanceId(InstanceId instanceId)
Sets the identity of the virtual machine instance.
|
Instance.Builder |
setMachineType(MachineTypeId machineType)
Sets the machine type identity.
|
Instance.Builder |
setMetadata(Metadata metadata)
Sets the instance metadata.
|
Instance.Builder |
setNetworkInterfaces(List<NetworkInterface> networkInterfaces)
Sets a list of network interfaces.
|
Instance.Builder |
setNetworkInterfaces(NetworkInterface... networkInterfaces)
Sets a list of network interfaces.
|
Instance.Builder |
setSchedulingOptions(SchedulingOptions schedulingOptions)
Sets the scheduling options for the instance.
|
Instance.Builder |
setServiceAccounts(List<ServiceAccount> serviceAccounts)
Sets a list of service accounts, with their specified scopes, authorized for this instance.
|
Instance.Builder |
setTags(Tags tags)
Sets the tags to apply to this instance.
|
public Instance.Builder setInstanceId(InstanceId instanceId)
InstanceInfo.Builder
setInstanceId
in class InstanceInfo.Builder
public Instance.Builder setDescription(String description)
InstanceInfo.Builder
setDescription
in class InstanceInfo.Builder
public Instance.Builder setTags(Tags tags)
InstanceInfo.Builder
setTags
in class InstanceInfo.Builder
public Instance.Builder setMachineType(MachineTypeId machineType)
InstanceInfo.Builder
setMachineType
in class InstanceInfo.Builder
public Instance.Builder setCanIpForward(Boolean canIpForward)
InstanceInfo.Builder
setCanIpForward
in class InstanceInfo.Builder
public Instance.Builder setNetworkInterfaces(List<NetworkInterface> networkInterfaces)
InstanceInfo.Builder
setNetworkInterfaces
in class InstanceInfo.Builder
public Instance.Builder setNetworkInterfaces(NetworkInterface... networkInterfaces)
InstanceInfo.Builder
setNetworkInterfaces
in class InstanceInfo.Builder
public Instance.Builder setAttachedDisks(List<AttachedDisk> attachedDisks)
InstanceInfo.Builder
AttachedDisk.AttachedDiskConfiguration.boot()
returns true
).setAttachedDisks
in class InstanceInfo.Builder
public Instance.Builder setAttachedDisks(AttachedDisk... attachedDisks)
InstanceInfo.Builder
setAttachedDisks
in class InstanceInfo.Builder
public Instance.Builder setMetadata(Metadata metadata)
InstanceInfo.Builder
setMetadata
in class InstanceInfo.Builder
public Instance.Builder setServiceAccounts(List<ServiceAccount> serviceAccounts)
InstanceInfo.Builder
setServiceAccounts
in class InstanceInfo.Builder
public Instance.Builder setSchedulingOptions(SchedulingOptions schedulingOptions)
InstanceInfo.Builder
setSchedulingOptions
in class InstanceInfo.Builder
public Instance build()
InstanceInfo.Builder
InstanceInfo
object.build
in class InstanceInfo.Builder
Copyright © 2019 Google LLC. All rights reserved.