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

rds-list-tags-for-resource

The Amazon RDS Command Line Interface (RDS CLI) has been deprecated. Instead, use the AWS CLI for RDS. To learn how to download and use the AWS CLI, see AWS Command Line Interface User Guide. For RDS commands available in the AWS CLI, see AWS CLI Reference for Amazon RDS.

The AWS CLI does not currently support the DownloadCompleteDBLogFile REST API action. To download an entire log file at once, rather than in parts using the download-db-log-file-portion command, use the last published RDS CLI and the rds-download-db-logfile command.

Description

Lists all tags associated with an Amazon RDS resource. The Amazon RDS resource is identified by its Amazon Resource Name (ARN) To learn how to construct the ARN that references a resource, see Constructing an RDS Amazon Resource Name (ARN).

Syntax

rds-list-tags-for-resource resource-name [General Options]

Options

Name Description Required

--resource-name value

The Amazon Resource Name (ARN) of the Amazon RDS resource that has the tags you want to list. To learn how to construct the ARN that references the resource 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-list-tags-for-resource my-resource-name.

Yes

Output

This command returns a table that contains the following information:

Note

Output values list the possible values returned by CLI commands. Not all values are returned for every call to a command. If a value is null or empty, it will not be included in the command output. For example, CLI commands to create or restore a DB instance will not return the Endpoint Address value because that value is null until the DB instance has finished being created or restored.

  • key—The name (key) of the tag.

  • value—The value of the tag.

Example

This example lists the tags of a DB instance.

Copy
PROMPT> rds-list-tags-for-resource arn:aws:rds:us-east-1:0123456789:db:my-db-instance TAG project trinity TAG cost-center 5092