Class Tag
- java.lang.Object
-
- software.amazon.awssdk.services.iam.model.Tag
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Tag.Builder,Tag>
@Generated("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.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTag.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Tag.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Stringkey()The key name that can be used to look up or retrieve the associated value.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Tag.Builder>serializableBuilderClass()Tag.BuildertoBuilder()StringtoString()Returns a string representation of this object.Stringvalue()The value associated with this tag.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
key
public final String key()
The key name that can be used to look up or retrieve the associated value. For example,
DepartmentorCost Centerare common choices.- Returns:
- The key name that can be used to look up or retrieve the associated value. For example,
DepartmentorCost Centerare common choices.
-
value
public final String value()
The value associated with this tag. For example, tags with a key name of
Departmentcould have values such asHuman Resources,Accounting, andSupport. Tags with a key name ofCost Centermight 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
Valueas 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.- Returns:
- The value associated with this tag. For example, tags with a key name of
Departmentcould have values such asHuman Resources,Accounting, andSupport. Tags with a key name ofCost Centermight 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
Valueas 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.
-
toBuilder
public Tag.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Tag.Builder,Tag>
-
builder
public static Tag.Builder builder()
-
serializableBuilderClass
public static Class<? extends Tag.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-