Class 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 tag that can be added to an ElastiCache cluster or replication group. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your ElastiCache resources, with the exception of global replication group. When you add or remove tags on replication groups, those actions will be replicated to all nodes in the replication group. A tag with a null Value is permitted.

    See Also:
    Serialized Form
    • Method Detail

      • key

        public final String key()

        The key for the tag. May not be null.

        Returns:
        The key for the tag. May not be null.
      • value

        public final String value()

        The tag's value. May be null.

        Returns:
        The tag's value. May be null.
      • serializableBuilderClass

        public static Class<? extends Tag.Builder> serializableBuilderClass()
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)