public class TagResourceRequest extends AmazonWebServiceRequest implements java.io.Serializable
Assigns a set of tags to the specified Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.
Each tag consists of a key and value, both of which you define. A key is a
general category for more specific values. For example, if you have two
versions of an identity pool, one for testing and another for production, you
might assign an Environment tag key to both identity pools. The
value of this key might be Test for one identity pool and
Production for the other.
Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values.
You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.
| Constructor and Description |
|---|
TagResourceRequest() |
| Modifier and Type | Method and Description |
|---|---|
TagResourceRequest |
addTagsEntry(java.lang.String key,
java.lang.String value)
The tags to assign to the identity pool.
|
TagResourceRequest |
clearTagsEntries()
Removes all the entries added into Tags.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getResourceArn()
The Amazon Resource Name (ARN) of the identity pool.
|
java.util.Map<java.lang.String,java.lang.String> |
getTags()
The tags to assign to the identity pool.
|
int |
hashCode() |
void |
setResourceArn(java.lang.String resourceArn)
The Amazon Resource Name (ARN) of the identity pool.
|
void |
setTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags to assign to the identity pool.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
TagResourceRequest |
withResourceArn(java.lang.String resourceArn)
The Amazon Resource Name (ARN) of the identity pool.
|
TagResourceRequest |
withTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags to assign to the identity pool.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.lang.String getResourceArn()
The Amazon Resource Name (ARN) of the identity pool.
Constraints:
Length: 20 - 2048
The Amazon Resource Name (ARN) of the identity pool.
public void setResourceArn(java.lang.String resourceArn)
The Amazon Resource Name (ARN) of the identity pool.
Constraints:
Length: 20 - 2048
resourceArn - The Amazon Resource Name (ARN) of the identity pool.
public TagResourceRequest withResourceArn(java.lang.String resourceArn)
The Amazon Resource Name (ARN) of the identity pool.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 20 - 2048
resourceArn - The Amazon Resource Name (ARN) of the identity pool.
public java.util.Map<java.lang.String,java.lang.String> getTags()
The tags to assign to the identity pool.
The tags to assign to the identity pool.
public void setTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags to assign to the identity pool.
tags - The tags to assign to the identity pool.
public TagResourceRequest withTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags to assign to the identity pool.
Returns a reference to this object so that method calls can be chained together.
tags - The tags to assign to the identity pool.
public TagResourceRequest addTagsEntry(java.lang.String key, java.lang.String value)
The tags to assign to the identity pool.
The method adds a new key-value pair into Tags parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Tags.value - The corresponding value of the entry to be added into Tags.public TagResourceRequest clearTagsEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object