@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable
A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see Tagging IAM Identities in the IAM User Guide.
| Constructor and Description |
|---|
Tag() |
| Modifier and Type | Method and Description |
|---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The key name that can be used to look up or retrieve the associated value.
|
String |
getValue()
The value associated with this tag.
|
int |
hashCode() |
void |
setKey(String key)
The key name that can be used to look up or retrieve the associated value.
|
void |
setValue(String value)
The value associated with this tag.
|
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
The key name that can be used to look up or retrieve the associated value.
|
Tag |
withValue(String value)
The value associated with this tag.
|
public void setKey(String key)
The key name that can be used to look up or retrieve the associated value. For example, Department
or Cost Center are common choices.
key - The key name that can be used to look up or retrieve the associated value. For example,
Department or Cost Center are common choices.public String getKey()
The key name that can be used to look up or retrieve the associated value. For example, Department
or Cost Center are common choices.
Department or Cost Center are common choices.public Tag withKey(String key)
The key name that can be used to look up or retrieve the associated value. For example, Department
or Cost Center are common choices.
key - The key name that can be used to look up or retrieve the associated value. For example,
Department or Cost Center are common choices.public void setValue(String value)
The value associated with this tag. For example, tags with a key name of Department could have
values such as Human Resources, Accounting, and Support. Tags with a key
name of Cost Center might have values that consist of the number associated with the different cost
centers in your company. Typically, many resources have tags with the same key name but with different values.
AWS always interprets the tag Value as a single string. If you need to store an array, you can store
comma-separated values in the string. However, you must interpret the value in your code.
value - The value associated with this tag. For example, tags with a key name of Department could
have values such as Human Resources, Accounting, and Support. Tags
with a key name of Cost Center might have values that consist of the number associated with
the different cost centers in your company. Typically, many resources have tags with the same key name but
with different values.
AWS always interprets the tag Value as a single string. If you need to store an array, you
can store comma-separated values in the string. However, you must interpret the value in your code.
public String getValue()
The value associated with this tag. For example, tags with a key name of Department could have
values such as Human Resources, Accounting, and Support. Tags with a key
name of Cost Center might have values that consist of the number associated with the different cost
centers in your company. Typically, many resources have tags with the same key name but with different values.
AWS always interprets the tag Value as a single string. If you need to store an array, you can store
comma-separated values in the string. However, you must interpret the value in your code.
Department could
have values such as Human Resources, Accounting, and Support. Tags
with a key name of Cost Center might have values that consist of the number associated with
the different cost centers in your company. Typically, many resources have tags with the same key name
but with different values.
AWS always interprets the tag Value as a single string. If you need to store an array, you
can store comma-separated values in the string. However, you must interpret the value in your code.
public Tag withValue(String value)
The value associated with this tag. For example, tags with a key name of Department could have
values such as Human Resources, Accounting, and Support. Tags with a key
name of Cost Center might have values that consist of the number associated with the different cost
centers in your company. Typically, many resources have tags with the same key name but with different values.
AWS always interprets the tag Value as a single string. If you need to store an array, you can store
comma-separated values in the string. However, you must interpret the value in your code.
value - The value associated with this tag. For example, tags with a key name of Department could
have values such as Human Resources, Accounting, and Support. Tags
with a key name of Cost Center might have values that consist of the number associated with
the different cost centers in your company. Typically, many resources have tags with the same key name but
with different values.
AWS always interprets the tag Value as a single string. If you need to store an array, you
can store comma-separated values in the string. However, you must interpret the value in your code.
public String toString()
toString in class ObjectObject.toString()Copyright © 2020. All rights reserved.