GetDimensionKeyDetails - Amazon RDS Performance Insights

GetDimensionKeyDetails

Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a SQL ID, GetDimensionKeyDetails retrieves the full text of the dimension db.sql.statement associated with this ID. This operation is useful because GetResourceMetrics and DescribeDimensionKeys don't support retrieval of large SQL statement text.

Request Syntax

{ "Group": "string", "GroupIdentifier": "string", "Identifier": "string", "RequestedDimensions": [ "string" ], "ServiceType": "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.

Group

The name of the dimension group. The only valid value is db.sql. Performance Insights searches the specified group for the dimension group ID.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: .*\S.*

Required: Yes

GroupIdentifier

The ID of the dimension group from which to retrieve dimension details. For dimension group db.sql, the group ID is db.sql.id.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: .*\S.*

Required: Yes

Identifier

The ID for a data source from which to gather dimension data. This ID must be immutable and unique within an AWS Region. When a DB instance is the data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: ^db-[a-zA-Z0-9-]*$

Required: Yes

ServiceType

The AWS service for which Performance Insights returns data. The only valid value is RDS.

Type: String

Valid Values: RDS

Required: Yes

RequestedDimensions

A list of dimensions to retrieve the detail data for within the given dimension group. For the dimension group db.sql, specify either the full dimension name db.sql.statement or the short dimension name statement. If you don't specify this parameter, Performance Insights returns all dimension data within the specified dimension group.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 10 items.

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: .*\S.*

Required: No

Response Syntax

{ "Dimensions": [ { "Dimension": "string", "Status": "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.

Dimensions

The details for the requested dimensions.

Type: Array of DimensionKeyDetail objects

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

Retrieve the full SQL text for a query

The following example requests the full text for the SQL query with the ID example-group-identifier, which is a placeholder for a SQL ID that you retrieved by calling GetResourceMetrics or DescribeDimensionKeys. Because the dimension details are available, the response shows the full SQL text.

Sample Request

{ "ServiceType":"RDS", "Identifier":"db-1ABCD2EFGHIJ3KL4M5NO6PQRS7", "Group": "db.sql", "GroupIdentifier": "example-group-identifier", "RequestedDimensions": ["statement"] }

Sample Response

{ "Dimensions":[ { "Value": "SELECT e.last_name, d.department_name FROM employees e, departments d WHERE e.department_id=d.department_id", "Dimension": "db.sql.statement", "Status": "AVAILABLE" }, ... ] }

See Also

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