@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TagSpecification extends Object implements Serializable, Cloneable
The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.
The Valid Values
lists all the resource types that can be tagged. However, the action you're using might
not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action
you're using, you'll get an error.
Constructor and Description |
---|
TagSpecification() |
Modifier and Type | Method and Description |
---|---|
TagSpecification |
clone() |
boolean |
equals(Object obj) |
String |
getResourceType()
The type of resource to tag on creation.
|
List<Tag> |
getTags()
The tags to apply to the resource.
|
int |
hashCode() |
void |
setResourceType(ResourceType resourceType)
The type of resource to tag on creation.
|
void |
setResourceType(String resourceType)
The type of resource to tag on creation.
|
void |
setTags(Collection<Tag> tags)
The tags to apply to the resource.
|
String |
toString()
Returns a string representation of this object.
|
TagSpecification |
withResourceType(ResourceType resourceType)
The type of resource to tag on creation.
|
TagSpecification |
withResourceType(String resourceType)
The type of resource to tag on creation.
|
TagSpecification |
withTags(Collection<Tag> tags)
The tags to apply to the resource.
|
TagSpecification |
withTags(Tag... tags)
The tags to apply to the resource.
|
public void setResourceType(String resourceType)
The type of resource to tag on creation.
resourceType
- The type of resource to tag on creation.ResourceType
public String getResourceType()
The type of resource to tag on creation.
ResourceType
public TagSpecification withResourceType(String resourceType)
The type of resource to tag on creation.
resourceType
- The type of resource to tag on creation.ResourceType
public void setResourceType(ResourceType resourceType)
The type of resource to tag on creation.
resourceType
- The type of resource to tag on creation.ResourceType
public TagSpecification withResourceType(ResourceType resourceType)
The type of resource to tag on creation.
resourceType
- The type of resource to tag on creation.ResourceType
public List<Tag> getTags()
The tags to apply to the resource.
public void setTags(Collection<Tag> tags)
The tags to apply to the resource.
tags
- The tags to apply to the resource.public TagSpecification withTags(Tag... tags)
The tags to apply to the resource.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the
existing values.
tags
- The tags to apply to the resource.public TagSpecification withTags(Collection<Tag> tags)
The tags to apply to the resource.
tags
- The tags to apply to the resource.public String toString()
toString
in class Object
Object.toString()
public TagSpecification clone()