@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Tag extends Object implements Serializable, Cloneable, StructuredPojo
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.
You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags.
For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy.
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The tag key.
|
String |
getValue()
The tag value.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setKey(String key)
The tag key.
|
void |
setValue(String value)
The tag value.
|
String |
toString()
Returns a string representation of this object.
|
Tag |
withKey(String key)
The tag key.
|
Tag |
withValue(String value)
The tag value.
|
public void setKey(String key)
The tag key. Tag keys must be unique per resource.
key
- The tag key. Tag keys must be unique per resource.public String getKey()
The tag key. Tag keys must be unique per resource.
public Tag withKey(String key)
The tag key. Tag keys must be unique per resource.
key
- The tag key. Tag keys must be unique per resource.public void setValue(String value)
The tag value.
value
- The tag value.public String getValue()
The tag value.
public Tag withValue(String value)
The tag value.
value
- The tag value.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.