public class Tag
extends java.lang.Object
implements java.io.Serializable
Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table.
AWS-assigned tag names and values are automatically assigned the aws: prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix user: in the Cost Allocation Report. You cannot backdate the application of a tag.
For an overview on tagging DynamoDB resources, see Tagging for DynamoDB in the Amazon DynamoDB Developer Guide.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
The key of the tag.Tag keys are case sensitive.
|
java.lang.String |
getValue()
The value of the tag.
|
int |
hashCode() |
void |
setKey(java.lang.String key)
The key of the tag.Tag keys are case sensitive.
|
void |
setValue(java.lang.String value)
The value of the tag.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withKey(java.lang.String key)
The key of the tag.Tag keys are case sensitive.
|
Tag |
withValue(java.lang.String value)
The value of the tag.
|
public java.lang.String getKey()
The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.
Constraints:
Length: 1 - 128
The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.
public void setKey(java.lang.String key)
The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.
Constraints:
Length: 1 - 128
key
- The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.
public Tag withKey(java.lang.String key)
The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
key
- The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.
public java.lang.String getValue()
The value of the tag. Tag values are case-sensitive and can be null.
Constraints:
Length: 0 - 256
The value of the tag. Tag values are case-sensitive and can be null.
public void setValue(java.lang.String value)
The value of the tag. Tag values are case-sensitive and can be null.
Constraints:
Length: 0 - 256
value
- The value of the tag. Tag values are case-sensitive and can be null.
public Tag withValue(java.lang.String value)
The value of the tag. Tag values are case-sensitive and can be null.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 256
value
- The value of the tag. Tag values are case-sensitive and can be null.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.