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

rds-add-tag-to-resource

The Amazon RDS Command Line Interface (CLI) has been deprecated. Instead, use the AWS CLI for RDS.

For information on how to download and use the AWS CLI, go to AWS Command Line Interface User Guide. For a reference of the RDS commands available in the AWS CLI, go to AWS CLI Reference for Amazon RDS.

Note

The AWS CLI does not currently support the DownloadCompleteDBLogFile REST API. If you need to download an entire log file at once, rather than in portions using the download-db-log-file-portion command, then you can continue to use the last published version of the RDS CLI and the rds-download-db-logfile command.

Description

Adds a tag to an Amazon RDS resource. RDS resources can have up to 10 tags, but you can add only one tag at a time using the command line interface. To learn how to construct the ARN that references the DB instance to be tagged, see Constructing an RDS Amazon Resource Name (ARN).

Syntax

rds-add-tag-to-resource resource-name

--tag-key value

--tag-value value

[General Options]

Options

NameDescriptionRequired

--resource-name value

The Amazon Resource Name (ARN) of the Amazon RDS resource that the tag will be added to. To learn how to construct the ARN that references the DB instance to be tagged, see Constructing an RDS Amazon Resource Name (ARN).

This parameter is the default parameter and can be passed as the first value in the command and without a parameter name, for example: rds-add-tag-to-resource my-resource-name.

Yes

--tag-key

-tk

The name of the tag to be added.

Yes

--tag-value

-tv

The value of the tag to be added.

No

Output

This command does not return any output.

Example

The following example adds a key named "project" with a value of "trinity" to a DB instance named mysql-db that is owned by customer 001234567890.


PROMPT> rds-add-tag-to-resource arn:aws:rds:us-west-2:001234567890:db:mysql-db -tk project -tv trinity