@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable
An Amazon Web Services resource tag that's associated with your S3 resource. You can add tags to new objects when you upload them, or you can add object tags to existing objects.
This operation is only supported for S3 Storage Lens groups and for S3 Access Grants. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered location, or grant.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The key of the key-value pair of a tag added to your Amazon Web Services resource.
|
String |
getValue()
The value of the key-value pair of a tag added to your Amazon Web Services resource.
|
int |
hashCode() |
void |
setKey(String key)
The key of the key-value pair of a tag added to your Amazon Web Services resource.
|
void |
setValue(String value)
The value of the key-value pair of a tag added to your Amazon Web Services resource.
|
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
The key of the key-value pair of a tag added to your Amazon Web Services resource.
|
Tag |
withValue(String value)
The value of the key-value pair of a tag added to your Amazon Web Services resource.
|
public void setKey(String key)
The key of the key-value pair of a tag added to your Amazon Web Services resource. A tag key can be up to 128
Unicode characters in length and is case-sensitive. System created tags that begin with aws:
aren’t
supported.
key
- The key of the key-value pair of a tag added to your Amazon Web Services resource. A tag key can be up to
128 Unicode characters in length and is case-sensitive. System created tags that begin with
aws:
aren’t supported.public String getKey()
The key of the key-value pair of a tag added to your Amazon Web Services resource. A tag key can be up to 128
Unicode characters in length and is case-sensitive. System created tags that begin with aws:
aren’t
supported.
aws:
aren’t supported.public Tag withKey(String key)
The key of the key-value pair of a tag added to your Amazon Web Services resource. A tag key can be up to 128
Unicode characters in length and is case-sensitive. System created tags that begin with aws:
aren’t
supported.
key
- The key of the key-value pair of a tag added to your Amazon Web Services resource. A tag key can be up to
128 Unicode characters in length and is case-sensitive. System created tags that begin with
aws:
aren’t supported.public void setValue(String value)
The value of the key-value pair of a tag added to your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive.
value
- The value of the key-value pair of a tag added to your Amazon Web Services resource. A tag value can be up
to 256 Unicode characters in length and is case-sensitive.public String getValue()
The value of the key-value pair of a tag added to your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive.
public Tag withValue(String value)
The value of the key-value pair of a tag added to your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive.
value
- The value of the key-value pair of a tag added to your Amazon Web Services resource. A tag value can be up
to 256 Unicode characters in length and is case-sensitive.public String toString()
toString
in class Object
Object.toString()