@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TagResourceRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP| Constructor and Description |
|---|
TagResourceRequest() |
| Modifier and Type | Method and Description |
|---|---|
TagResourceRequest |
clone() |
boolean |
equals(Object obj) |
String |
getResourceId()
The ID of the resource to add a tag to.
|
List<Tag> |
getTags()
A list of tags to add to the specified resource.
|
int |
hashCode() |
void |
setResourceId(String resourceId)
The ID of the resource to add a tag to.
|
void |
setTags(Collection<Tag> tags)
A list of tags to add to the specified resource.
|
String |
toString()
Returns a string representation of this object.
|
TagResourceRequest |
withResourceId(String resourceId)
The ID of the resource to add a tag to.
|
TagResourceRequest |
withTags(Collection<Tag> tags)
A list of tags to add to the specified resource.
|
TagResourceRequest |
withTags(Tag... tags)
A list of tags to add to the specified resource.
|
addHandlerContext, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeoutpublic void setResourceId(String resourceId)
The ID of the resource to add a tag to.
resourceId - The ID of the resource to add a tag to.public String getResourceId()
The ID of the resource to add a tag to.
public TagResourceRequest withResourceId(String resourceId)
The ID of the resource to add a tag to.
resourceId - The ID of the resource to add a tag to.public List<Tag> getTags()
A list of tags to add to the specified resource.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to: r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string,
but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to:
r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty
string, but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
public void setTags(Collection<Tag> tags)
A list of tags to add to the specified resource.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to: r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string,
but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
tags - A list of tags to add to the specified resource.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to:
r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty
string, but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
public TagResourceRequest withTags(Tag... tags)
A list of tags to add to the specified resource.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to: r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string,
but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
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 - A list of tags to add to the specified resource.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to:
r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty
string, but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
public TagResourceRequest withTags(Collection<Tag> tags)
A list of tags to add to the specified resource.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to: r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string,
but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
tags - A list of tags to add to the specified resource.
You can specify any of the following taggable resources.
AWS account – specify the account ID number.
Organizational unit – specify the OU ID that begins with ou- and looks similar to:
ou-1a2b-34uvwxyz
Root – specify the root ID that begins with r- and looks similar to:
r-1a2b
Policy – specify the policy ID that begins with p- andlooks similar to:
p-12abcdefg3
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty
string, but you can't set it to null.
If any one of the tags is invalid or if you exceed the allowed number of tags for an account user, then the entire request fails and the account is not created.
public String toString()
toString in class ObjectObject.toString()public TagResourceRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2021. All rights reserved.