@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable, StructuredPojo
A label that you assign to a resource. Athena resources include workgroups, data catalogs, and capacity reservations. Each tag consists of a key and an optional value, both of which you define. For example, you can use tags to categorize Athena resources by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter the resources in your account. For best practices, see Tagging Best Practices. Tag keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you specify more than one tag, separate them by commas.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
A tag key.
|
String |
getValue()
A tag value.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setKey(String key)
A tag key.
|
void |
setValue(String value)
A tag value.
|
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
A tag key.
|
Tag |
withValue(String value)
A tag value.
|
public void setKey(String key)
A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
key
- A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and
numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive
and must be unique per resource.public String getKey()
A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
public Tag withKey(String key)
A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
key
- A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and
numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive
and must be unique per resource.public void setValue(String value)
A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
value
- A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and
numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are
case-sensitive.public String getValue()
A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
public Tag withValue(String value)
A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
value
- A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and
numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are
case-sensitive.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.