public class InstanceInfo extends Object implements Serializable
By default, each Compute Engine instance has a small root persistent disk that contains the operating system. When your applications require additional storage space, you can add one or more additional disks to your instance.
Instances communicate with other instances in the same network through a local area network. Instances communicate with the rest of the world through the Internet. A network lives in a project and is isolated from other networks in the project. A project can have up to five different networks.
Modifier and Type | Class and Description |
---|---|
static class |
InstanceInfo.Builder
A builder for
InstanceInfo objects. |
static class |
InstanceInfo.BuilderImpl |
static class |
InstanceInfo.Status
The status of the instance.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
canIpForward()
Returns whether to allow this instance to send and receive packets with non-matching
destination or source IPs.
|
boolean |
equals(Object obj) |
List<AttachedDisk> |
getAttachedDisks()
Returns a list of disks attached to the instance.
|
String |
getCpuPlatform()
Returns the CPU platform used by this instance.
|
Long |
getCreationTimestamp()
Returns the creation timestamp in milliseconds since epoch.
|
String |
getDescription()
Returns a textual description of the instance.
|
String |
getGeneratedId()
Returns the service-generated unique identifier for the instance.
|
InstanceId |
getInstanceId()
Returns the instance identity.
|
MachineTypeId |
getMachineType()
Returns the machine type identity.
|
Metadata |
getMetadata()
Returns the instance metadata.
|
List<NetworkInterface> |
getNetworkInterfaces()
Returns a list of network interfaces.
|
SchedulingOptions |
getSchedulingOptions()
Returns the scheduling options for the instance.
|
List<ServiceAccount> |
getServiceAccounts()
Returns a list of service accounts, with their specified scopes, authorized for this instance.
|
InstanceInfo.Status |
getStatus()
Returns the status of the instance.
|
String |
getStatusMessage()
Returns an optional, human-readable explanation of the status.
|
Tags |
getTags()
Returns the tags of this instance.
|
int |
hashCode() |
static InstanceInfo.Builder |
newBuilder(InstanceId instanceId,
MachineTypeId machineType)
Returns a builder for an
InstanceInfo object given the instance identity and the
machine type. |
static InstanceInfo |
of(InstanceId instanceId,
MachineTypeId machineType,
AttachedDisk disk,
NetworkInterface networkInterface)
Returns an
InstanceInfo object given the instance identity, the machine type, a disk to
attach to the instance and a network interface. |
InstanceInfo.Builder |
toBuilder()
Returns a builder for the current instance.
|
String |
toString() |
public String getGeneratedId()
public InstanceId getInstanceId()
public Long getCreationTimestamp()
public String getDescription()
public InstanceInfo.Status getStatus()
public String getStatusMessage()
public Tags getTags()
public MachineTypeId getMachineType()
public Boolean canIpForward()
public List<NetworkInterface> getNetworkInterfaces()
public List<AttachedDisk> getAttachedDisks()
public Metadata getMetadata()
public List<ServiceAccount> getServiceAccounts()
public SchedulingOptions getSchedulingOptions()
public String getCpuPlatform()
public InstanceInfo.Builder toBuilder()
public static InstanceInfo.Builder newBuilder(InstanceId instanceId, MachineTypeId machineType)
InstanceInfo
object given the instance identity and the
machine type.public static InstanceInfo of(InstanceId instanceId, MachineTypeId machineType, AttachedDisk disk, NetworkInterface networkInterface)
InstanceInfo
object given the instance identity, the machine type, a disk to
attach to the instance and a network interface. disk
must be a boot disk (i.e. AttachedDisk.AttachedDiskConfiguration.boot()
returns true
).Copyright © 2019 Google LLC. All rights reserved.