java.lang.Object
com.amazonaws.services.elasticmapreduce.model.Instance
All Implemented Interfaces:
Serializable, Cloneable

public class Instance extends Object implements Serializable, Cloneable

Represents an EC2 instance provisioned as part of cluster.

See Also:
  • Constructor Details

    • Instance

      public Instance()
  • Method Details

    • setId

      public void setId(String id)

      The unique identifier for the instance in Amazon EMR.

      Parameters:
      id - The unique identifier for the instance in Amazon EMR.
    • getId

      public String getId()

      The unique identifier for the instance in Amazon EMR.

      Returns:
      The unique identifier for the instance in Amazon EMR.
    • withId

      public Instance withId(String id)

      The unique identifier for the instance in Amazon EMR.

      Parameters:
      id - The unique identifier for the instance in Amazon EMR.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setEc2InstanceId

      public void setEc2InstanceId(String ec2InstanceId)

      The unique identifier of the instance in Amazon EC2.

      Parameters:
      ec2InstanceId - The unique identifier of the instance in Amazon EC2.
    • getEc2InstanceId

      public String getEc2InstanceId()

      The unique identifier of the instance in Amazon EC2.

      Returns:
      The unique identifier of the instance in Amazon EC2.
    • withEc2InstanceId

      public Instance withEc2InstanceId(String ec2InstanceId)

      The unique identifier of the instance in Amazon EC2.

      Parameters:
      ec2InstanceId - The unique identifier of the instance in Amazon EC2.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setPublicDnsName

      public void setPublicDnsName(String publicDnsName)

      The public DNS name of the instance.

      Parameters:
      publicDnsName - The public DNS name of the instance.
    • getPublicDnsName

      public String getPublicDnsName()

      The public DNS name of the instance.

      Returns:
      The public DNS name of the instance.
    • withPublicDnsName

      public Instance withPublicDnsName(String publicDnsName)

      The public DNS name of the instance.

      Parameters:
      publicDnsName - The public DNS name of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setPublicIpAddress

      public void setPublicIpAddress(String publicIpAddress)

      The public IP address of the instance.

      Parameters:
      publicIpAddress - The public IP address of the instance.
    • getPublicIpAddress

      public String getPublicIpAddress()

      The public IP address of the instance.

      Returns:
      The public IP address of the instance.
    • withPublicIpAddress

      public Instance withPublicIpAddress(String publicIpAddress)

      The public IP address of the instance.

      Parameters:
      publicIpAddress - The public IP address of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setPrivateDnsName

      public void setPrivateDnsName(String privateDnsName)

      The private DNS name of the instance.

      Parameters:
      privateDnsName - The private DNS name of the instance.
    • getPrivateDnsName

      public String getPrivateDnsName()

      The private DNS name of the instance.

      Returns:
      The private DNS name of the instance.
    • withPrivateDnsName

      public Instance withPrivateDnsName(String privateDnsName)

      The private DNS name of the instance.

      Parameters:
      privateDnsName - The private DNS name of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setPrivateIpAddress

      public void setPrivateIpAddress(String privateIpAddress)

      The private IP address of the instance.

      Parameters:
      privateIpAddress - The private IP address of the instance.
    • getPrivateIpAddress

      public String getPrivateIpAddress()

      The private IP address of the instance.

      Returns:
      The private IP address of the instance.
    • withPrivateIpAddress

      public Instance withPrivateIpAddress(String privateIpAddress)

      The private IP address of the instance.

      Parameters:
      privateIpAddress - The private IP address of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setStatus

      public void setStatus(InstanceStatus status)

      The current status of the instance.

      Parameters:
      status - The current status of the instance.
    • getStatus

      public InstanceStatus getStatus()

      The current status of the instance.

      Returns:
      The current status of the instance.
    • withStatus

      public Instance withStatus(InstanceStatus status)

      The current status of the instance.

      Parameters:
      status - The current status of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setInstanceGroupId

      public void setInstanceGroupId(String instanceGroupId)

      The identifier of the instance group to which this instance belongs.

      Parameters:
      instanceGroupId - The identifier of the instance group to which this instance belongs.
    • getInstanceGroupId

      public String getInstanceGroupId()

      The identifier of the instance group to which this instance belongs.

      Returns:
      The identifier of the instance group to which this instance belongs.
    • withInstanceGroupId

      public Instance withInstanceGroupId(String instanceGroupId)

      The identifier of the instance group to which this instance belongs.

      Parameters:
      instanceGroupId - The identifier of the instance group to which this instance belongs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getEbsVolumes

      public List<EbsVolume> getEbsVolumes()

      The list of EBS volumes that are attached to this instance.

      Returns:
      The list of EBS volumes that are attached to this instance.
    • setEbsVolumes

      public void setEbsVolumes(Collection<EbsVolume> ebsVolumes)

      The list of EBS volumes that are attached to this instance.

      Parameters:
      ebsVolumes - The list of EBS volumes that are attached to this instance.
    • withEbsVolumes

      public Instance withEbsVolumes(EbsVolume... ebsVolumes)

      The list of EBS volumes that are attached to this instance.

      NOTE: This method appends the values to the existing list (if any). Use setEbsVolumes(java.util.Collection) or withEbsVolumes(java.util.Collection) if you want to override the existing values.

      Parameters:
      ebsVolumes - The list of EBS volumes that are attached to this instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withEbsVolumes

      public Instance withEbsVolumes(Collection<EbsVolume> ebsVolumes)

      The list of EBS volumes that are attached to this instance.

      Parameters:
      ebsVolumes - The list of EBS volumes that are attached to this instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Instance clone()
      Overrides:
      clone in class Object