Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

TagResource

Focus mode
TagResource - Amazon RDS Performance Insights

Adds metadata tags to the Amazon RDS Performance Insights resource.

Request Syntax

{ "ResourceARN": "string", "ServiceType": "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.

Note

In the following list, the required parameters are described first.

ResourceARN

The Amazon RDS Performance Insights resource that the tags are 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

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: ^arn:.*:pi:.*$

Required: Yes

ServiceType

The AWS service for which Performance Insights returns metrics. Valid value is RDS.

Type: String

Valid Values: RDS | DOCDB

Required: Yes

Tags

The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: Yes

Response Elements

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

Errors

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

InternalServiceError

The request failed due to an unknown error.

HTTP Status Code: 500

InvalidArgumentException

One of the arguments provided is invalid for this request.

HTTP Status Code: 400

NotAuthorizedException

The user is not authorized to perform this request.

HTTP Status Code: 400

Examples

Add tag to an analysis report

The following example adds a tag to the report report-01234567890abcdef.

Sample Request

POST / HTTP/1.1 Host: <Hostname> Accept-Encoding: identity X-Amz-Target: PerformanceInsightsv20180227.TagResource Content-Type: application/x-amz-json-1.1 User-Agent: <UserAgentString> X-Amz-Date: <Date> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature> Content-Length: <PayloadSizeBytes> { "ServiceType": "RDS", "ResourceARN": "arn:aws:pi:us-west-2:123456789012:perf-reports/rds/db-ABC1DEFGHIJKL2MNOPQRSTUV3W/report-01234567890abcdef", "Tags": [{ "Key": "MyKey", "Value": "MyValue" }] }

Sample Response

HTTP/1.1 200 OK Content-Type: application/x-amz-json-1.1 Date: <Date> x-amzn-RequestId: <RequestId> Content-Length: <PayloadSizeBytes> Connection: keep-alive

See Also

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

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.