Class Tag
- 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Tag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tagclone()booleanequals(Object obj)StringgetKey()The key in a key-value pair.StringgetValue()The value in a key-value pair of a tag.inthashCode()voidsetKey(String key)The key in a key-value pair.voidsetValue(String value)The value in a key-value pair of a tag.StringtoString()Returns a string representation of this object; useful for testing and debugging.TagwithKey(String key)The key in a key-value pair.TagwithValue(String value)The value in a key-value pair of a tag.
-
-
-
Method Detail
-
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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-