TagResource - Amazon MemoryDB

TagResource

Use this operation to add tags to a resource. A tag is a key-value pair where the key and value are case-sensitive. You can use tags to categorize and track all your MemoryDB resources. For more information, see Tagging your MemoryDB resources.

When you add tags to multi region clusters, you might not immediately see the latest effective tags in the ListTags API response due to it being eventually consistent specifically for multi region clusters. For more information, see Tagging your MemoryDB resources.

You can specify cost-allocation tags for your MemoryDB resources, Amazon generates a cost allocation report as a comma-separated value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services. For more information, see Using Cost Allocation Tags.

Request Syntax

{ "ResourceArn": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ResourceArn

The Amazon Resource Name (ARN) of the resource to which the tags are to be added.

Type: String

Required: Yes

Tags

A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.

Type: Array of Tag objects

Array Members: Maximum number of 200 items.

Required: Yes

Response Syntax

{ "TagList": [ { "Key": "string", "Value": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

TagList

A list of tags as key-value pairs.

Type: Array of Tag objects

Array Members: Maximum number of 200 items.

Errors

For information about the errors that are common to all actions, see Common Errors.

ACLNotFoundFault

HTTP Status Code: 400

ClusterNotFoundFault

HTTP Status Code: 400

InvalidARNFault

HTTP Status Code: 400

InvalidClusterStateFault

HTTP Status Code: 400

InvalidParameterValueException

HTTP Status Code: 400

MultiRegionClusterNotFoundFault

The specified multi-Region cluster does not exist.

HTTP Status Code: 400

MultiRegionParameterGroupNotFoundFault

The specified multi-Region parameter group does not exist.

HTTP Status Code: 400

ParameterGroupNotFoundFault

HTTP Status Code: 400

ServiceLinkedRoleNotFoundFault

HTTP Status Code: 400

SnapshotNotFoundFault

HTTP Status Code: 400

SubnetGroupNotFoundFault

HTTP Status Code: 400

TagQuotaPerResourceExceeded

HTTP Status Code: 400

UserNotFoundFault

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: