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

public class Tag extends Object implements Serializable, Cloneable

A custom key-value pair associated with a resource such as a CloudTrail trail.

See Also:
  • Constructor Details

    • Tag

      public Tag()
  • Method Details

    • setKey

      public void setKey(String key)

      The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.

      Parameters:
      key - The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
    • getKey

      public String getKey()

      The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.

      Returns:
      The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
    • withKey

      public Tag withKey(String key)

      The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.

      Parameters:
      key - The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setValue

      public void setValue(String value)

      The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.

      Parameters:
      value - The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
    • getValue

      public String getValue()

      The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.

      Returns:
      The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
    • withValue

      public Tag withValue(String value)

      The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.

      Parameters:
      value - The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
      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