public class Tag
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
The Tag type enables you to specify a key-value pair that can be used to store information about an AWS CloudFormation stack.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key
Required.
|
private java.lang.String |
value
Required.
|
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
Required.
|
java.lang.String |
getValue()
Required.
|
int |
hashCode() |
void |
setKey(java.lang.String key)
Required.
|
void |
setValue(java.lang.String value)
Required.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withKey(java.lang.String key)
Required.
|
Tag |
withValue(java.lang.String value)
Required.
|
private java.lang.String key
Required. A string used to identify this tag. You can specify a
maximum of 128 characters for a tag key. Tags owned by Amazon Web
Services (AWS) have the reserved prefix: aws:
.
private java.lang.String value
Required. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
public void setKey(java.lang.String key)
Required. A string used to identify this tag. You can specify a
maximum of 128 characters for a tag key. Tags owned by Amazon Web
Services (AWS) have the reserved prefix: aws:
.
key
- Required. A string used to identify this tag. You can
specify a maximum of 128 characters for a tag key. Tags owned by
Amazon Web Services (AWS) have the reserved prefix:
aws:
.public java.lang.String getKey()
Required. A string used to identify this tag. You can specify a
maximum of 128 characters for a tag key. Tags owned by Amazon Web
Services (AWS) have the reserved prefix: aws:
.
aws:
.public Tag withKey(java.lang.String key)
Required. A string used to identify this tag. You can specify a
maximum of 128 characters for a tag key. Tags owned by Amazon Web
Services (AWS) have the reserved prefix: aws:
.
key
- Required. A string used to identify this tag. You can
specify a maximum of 128 characters for a tag key. Tags owned by
Amazon Web Services (AWS) have the reserved prefix:
aws:
.public void setValue(java.lang.String value)
Required. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
value
- Required. A string containing the value for this tag. You
can specify a maximum of 256 characters for a tag value.public java.lang.String getValue()
Required. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
public Tag withValue(java.lang.String value)
Required. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
value
- Required. A string containing the value for this tag. You
can specify a maximum of 256 characters for a tag value.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Tag clone()
clone
in class java.lang.Object