org.jclouds.googlecomputeengine.domain
Class Instance

java.lang.Object
  extended by org.jclouds.googlecomputeengine.domain.Resource
      extended by org.jclouds.googlecomputeengine.domain.Instance

@Beta
public class Instance
extends Resource

Represents a virtual machine.

Author:
David Alves
See Also:

Nested Class Summary
static class Instance.AttachedDisk
          A disk attached to an Instance.
static class Instance.Builder
           
static class Instance.NetworkInterface
          A network interface for an Instance.
static class Instance.PersistentAttachedDisk
           
static class Instance.SerialPortOutput
          The output of an instance's serial port;
static class Instance.ServiceAccount
          A service account for which access tokens are to be made available to the instance through metadata queries.
static class Instance.Status
           
static class Instance.Tags
          Tags for an instance, with their fingerprint.
 
Nested classes/interfaces inherited from class org.jclouds.googlecomputeengine.domain.Resource
Resource.Kind
 
Field Summary
protected  Set<Instance.AttachedDisk> disks
           
protected  URI machineType
           
protected  Metadata metadata
           
protected  Set<Instance.NetworkInterface> networkInterfaces
           
protected  Set<Instance.ServiceAccount> serviceAccounts
           
protected  Instance.Status status
           
protected  com.google.common.base.Optional<String> statusMessage
           
protected  Instance.Tags tags
           
protected  URI zone
           
 
Fields inherited from class org.jclouds.googlecomputeengine.domain.Resource
creationTimestamp, description, id, kind, name, selfLink
 
Constructor Summary
protected Instance(String id, Date creationTimestamp, URI selfLink, String name, String description, Instance.Tags tags, URI machineType, Instance.Status status, String statusMessage, URI zone, Set<Instance.NetworkInterface> networkInterfaces, Set<Instance.AttachedDisk> disks, Metadata metadata, Set<Instance.ServiceAccount> serviceAccounts)
           
 
Method Summary
static Instance.Builder builder()
           
 boolean equals(Object obj)
          
 Set<Instance.AttachedDisk> getDisks()
           
 URI getMachineType()
           
 Metadata getMetadata()
           
 Set<Instance.NetworkInterface> getNetworkInterfaces()
           
 Set<Instance.ServiceAccount> getServiceAccounts()
           
 Instance.Status getStatus()
           
 com.google.common.base.Optional<String> getStatusMessage()
           
 Instance.Tags getTags()
          Used to identify valid sources or targets for network firewalls.
 URI getZone()
           
protected  com.google.common.base.Objects.ToStringHelper string()
          
 Instance.Builder toBuilder()
           
 String toString()
          
 
Methods inherited from class org.jclouds.googlecomputeengine.domain.Resource
getCreationTimestamp, getDescription, getId, getKind, getName, getSelfLink, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

tags

protected final Instance.Tags tags

machineType

protected final URI machineType

status

protected final Instance.Status status

statusMessage

protected final com.google.common.base.Optional<String> statusMessage

zone

protected final URI zone

networkInterfaces

protected final Set<Instance.NetworkInterface> networkInterfaces

disks

protected final Set<Instance.AttachedDisk> disks

metadata

protected final Metadata metadata

serviceAccounts

protected final Set<Instance.ServiceAccount> serviceAccounts
Constructor Detail

Instance

protected Instance(String id,
                   Date creationTimestamp,
                   URI selfLink,
                   String name,
                   String description,
                   Instance.Tags tags,
                   URI machineType,
                   Instance.Status status,
                   String statusMessage,
                   URI zone,
                   Set<Instance.NetworkInterface> networkInterfaces,
                   Set<Instance.AttachedDisk> disks,
                   Metadata metadata,
                   Set<Instance.ServiceAccount> serviceAccounts)
Method Detail

getTags

public Instance.Tags getTags()
Used to identify valid sources or targets for network firewalls. Provided by the client when the instance is created. Each tag must be unique, must be 1-63 characters long, and comply with RFC1035.

Returns:
an optional set of items applied to this instance.

getMachineType

public URI getMachineType()
Returns:
URL of the machine type resource describing which machine type to use to host the instance.

getStatus

public Instance.Status getStatus()
Returns:
Instance status

getStatusMessage

@Nullable
public com.google.common.base.Optional<String> getStatusMessage()
Returns:
an optional, human-readable explanation of the status.

getZone

public URI getZone()
Returns:
URL of the zone resource describing where this instance should be hosted; provided by the client when the instance is created.

getNetworkInterfaces

public Set<Instance.NetworkInterface> getNetworkInterfaces()
Returns:
set of NetworkInterfaces
See Also:
Instance.NetworkInterface

getDisks

public Set<Instance.AttachedDisk> getDisks()
Returns:
array of disks associated with this instance. Persistent disks must be created before you can assign them.
See Also:
Instance.AttachedDisk

getMetadata

public Metadata getMetadata()
Returns:
metadata for this instance

getServiceAccounts

public Set<Instance.ServiceAccount> getServiceAccounts()
Returns:
list of service accounts each with specified scopes.
See Also:
Instance.ServiceAccount

equals

public boolean equals(Object obj)

Overrides:
equals in class Resource

string

protected com.google.common.base.Objects.ToStringHelper string()

Overrides:
string in class Resource

toString

public String toString()

Overrides:
toString in class Resource

builder

public static Instance.Builder builder()

toBuilder

public Instance.Builder toBuilder()
Overrides:
toBuilder in class Resource


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.