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 |
|---|---|
List<AttachedDisk> |
attachedDisks()
Returns a list of disks attached to the instance.
|
static InstanceInfo.Builder |
builder(InstanceId instanceId,
MachineTypeId machineType)
Returns a builder for an
InstanceInfo object given the instance identity and the
machine type. |
Boolean |
canIpForward()
Returns whether to allow this instance to send and receive packets with non-matching
destination or source IPs.
|
String |
cpuPlatform()
Returns the CPU platform used by this instance.
|
Long |
creationTimestamp()
Returns the creation timestamp in milliseconds since epoch.
|
String |
description()
Returns a textual description of the instance.
|
boolean |
equals(Object obj) |
String |
generatedId()
Returns the service-generated unique identifier for the instance.
|
int |
hashCode() |
InstanceId |
instanceId()
Returns the instance identity.
|
MachineTypeId |
machineType()
Returns the machine type identity.
|
Metadata |
metadata()
Returns the instance metadata.
|
List<NetworkInterface> |
networkInterfaces()
Returns a list of network interfaces.
|
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. |
SchedulingOptions |
schedulingOptions()
Returns the scheduling options for the instance.
|
List<ServiceAccount> |
serviceAccounts()
Returns a list of service accounts, with their specified scopes, authorized for this instance.
|
InstanceInfo.Status |
status()
Returns the status of the instance.
|
String |
statusMessage()
Returns an optional, human-readable explanation of the status.
|
Tags |
tags()
Returns the tags of this instance.
|
InstanceInfo.Builder |
toBuilder()
Returns a builder for the current instance.
|
String |
toString() |
public String generatedId()
public InstanceId instanceId()
public Long creationTimestamp()
public String description()
public InstanceInfo.Status status()
public String statusMessage()
public Tags tags()
public MachineTypeId machineType()
public Boolean canIpForward()
public List<NetworkInterface> networkInterfaces()
public List<AttachedDisk> attachedDisks()
public Metadata metadata()
public List<ServiceAccount> serviceAccounts()
public SchedulingOptions schedulingOptions()
public String cpuPlatform()
public InstanceInfo.Builder toBuilder()
public static InstanceInfo.Builder builder(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 © 2016 Google. All rights reserved.