Menu
Amazon Relational Database Service
API Reference (API Version 2014-10-31)

AddTagsToResource

Adds metadata tags to an Amazon RDS resource. These tags can also be used with cost allocation reporting to track cost associated with Amazon RDS resources, or used in a Condition statement in an IAM policy for Amazon RDS.

For an overview on tagging Amazon RDS resources, see Tagging Amazon RDS Resources.

Request Parameters

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

ResourceName

The Amazon RDS resource the tags will be added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN).

Type: String

Required: Yes

Tags.Tag.N

The tags to be assigned to the Amazon RDS resource.

Type: array of Tag objects

Required: Yes

Errors

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

DBInstanceNotFound

DBInstanceIdentifier does not refer to an existing DB instance.

HTTP Status Code: 404

DBSnapshotNotFound

DBSnapshotIdentifier does not refer to an existing DB snapshot.

HTTP Status Code: 404

Example

Sample Request

https://rds.us-west-2.amazonaws.com/
    ?Action=AddTagsToResource
    &ResourceName=arn%3Aaws%3Ards%3Aus-west-2%3A123456789012%3Adb%3Asample
    &SignatureMethod=HmacSHA256
    &SignatureVersion=4
    &Tags.member.1.Key=InstanceType
    &Tags.member.1.Value=Development
    &Tags.member.2.Key=Owner
    &Tags.member.2.Value=Admin123
    &Version=2014-10-31
    &X-Amz-Algorithm=AWS4-HMAC-SHA256
    &X-Amz-Credential=AKIADQKE4SARGYLE/20160913/us-west-2/rds/aws4_request
    &X-Amz-Date=20160913T173915Z
    &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date
    &X-Amz-Signature=90a257aa949fab364b7db0964a255986922f933f2e55e7b582ce6f9ccca2a4e0

Sample Response

<AddTagsToResourceResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/">
  <ResponseMetadata>
    <RequestId>fd9cd844-79d8-11e6-956c-915ad715fa2f</RequestId>
  </ResponseMetadata>
</AddTagsToResourceResponse>