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

public class Tag extends Object implements Serializable, Cloneable

A key/value pair containing user-defined metadata that you can associate with an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clu\ sters to track your Amazon EMR resource allocation costs. For more information, see Tagging Amazon EMR Resources.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tag()
    Default constructor for Tag object.
    Tag(String key, String value)
    Constructs a new Tag object.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    A user-defined key, which is the minimum required information for a valid tag.
    A user-defined value, which is optional in a tag.
    int
     
    void
    A user-defined key, which is the minimum required information for a valid tag.
    void
    A user-defined value, which is optional in a tag.
    Returns a string representation of this object; useful for testing and debugging.
    A user-defined key, which is the minimum required information for a valid tag.
    A user-defined value, which is optional in a tag.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Tag

      public Tag()
      Default constructor for Tag object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • Tag

      public Tag(String key, String value)
      Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      key - A user-defined key, which is the minimum required information for a valid tag. For more information, see Tagging Amazon EMR Resources.
      value - A user-defined value, which is optional in a tag. For more information, see Tagging Amazon EMR Resources.
  • Method Details

    • setKey

      public void setKey(String key)

      A user-defined key, which is the minimum required information for a valid tag. For more information, see Tagging Amazon EMR Resources.

      Parameters:
      key - A user-defined key, which is the minimum required information for a valid tag. For more information, see Tagging Amazon EMR Resources.
    • getKey

      public String getKey()

      A user-defined key, which is the minimum required information for a valid tag. For more information, see Tagging Amazon EMR Resources.

      Returns:
      A user-defined key, which is the minimum required information for a valid tag. For more information, see Tagging Amazon EMR Resources.
    • withKey

      public Tag withKey(String key)

      A user-defined key, which is the minimum required information for a valid tag. For more information, see Tagging Amazon EMR Resources.

      Parameters:
      key - A user-defined key, which is the minimum required information for a valid tag. For more information, see Tagging Amazon EMR Resources.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setValue

      public void setValue(String value)

      A user-defined value, which is optional in a tag. For more information, see Tagging Amazon EMR Resources.

      Parameters:
      value - A user-defined value, which is optional in a tag. For more information, see Tagging Amazon EMR Resources.
    • getValue

      public String getValue()

      A user-defined value, which is optional in a tag. For more information, see Tagging Amazon EMR Resources.

      Returns:
      A user-defined value, which is optional in a tag. For more information, see Tagging Amazon EMR Resources.
    • withValue

      public Tag withValue(String value)

      A user-defined value, which is optional in a tag. For more information, see Tagging Amazon EMR Resources.

      Parameters:
      value - A user-defined value, which is optional in a tag. For more information, see Tagging Amazon EMR Resources.
      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 Tag clone()
      Overrides:
      clone in class Object