public class Tag extends Object implements Serializable, Cloneable
A custom key-value pair associated with a resource such as a CloudTrail trail.
| Constructor and Description |
|---|
Tag() |
| Modifier and Type | Method and Description |
|---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The key in a key-value pair.
|
String |
getValue()
The value in a key-value pair of a tag.
|
int |
hashCode() |
void |
setKey(String key)
The key in a key-value pair.
|
void |
setValue(String value)
The value in a key-value pair of a tag.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withKey(String key)
The key in a key-value pair.
|
Tag |
withValue(String value)
The value in a key-value pair of a tag.
|
public String getKey()
public void setKey(String key)
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.public Tag withKey(String key)
Returns a reference to this object so that method calls can be chained together.
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.public String getValue()
public void setValue(String value)
value - The value in a key-value pair of a tag. The value must be no longer
than 256 Unicode characters.public Tag withValue(String value)
Returns a reference to this object so that method calls can be chained together.
value - The value in a key-value pair of a tag. The value must be no longer
than 256 Unicode characters.public String toString()
toString in class ObjectObject.toString()Copyright © 2015. All rights reserved.