@Generated(value="software.amazon.awssdk:codegen") public final class Tag extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Tag.Builder,Tag>
A structure that represents user-provided metadata that can be associated with an IAM resource. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Tag.Builder |
| Modifier and Type | Method and Description |
|---|---|
static Tag.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
String |
key()
The key name that can be used to look up or retrieve the associated value.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends Tag.Builder> |
serializableBuilderClass() |
Tag.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
String |
value()
The value associated with this tag.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final 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.
Department or Cost Center are common choices.public final 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.
Amazon Web Services 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.
Amazon Web Services 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.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Tag.Builder,Tag>public static Tag.Builder builder()
public static Class<? extends Tag.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.