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. Performance Insights searches the specified group for the dimension group ID. The following group name values are valid:

  • db.query (Amazon DocumentDB only)

  • db.sql (Amazon RDS and Aurora only)

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. The following group ID values are valid:

  • db.sql.id for dimension group db.sql (Aurora and RDS only)

  • db.query.id for dimension group db.query (DocumentDB only)

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: ^[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 | DOCDB

Required: Yes

RequestedDimensions

A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:

  • db.sql - Specify either the full dimension name db.sql.statement or the short dimension name statement (Aurora and RDS only).

  • db.query - Specify either the full dimension name db.query.statement or the short dimension name statement (DocumentDB only).

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: ^[a-zA-Z0-9-_\.:/*)( ]+$

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-ABC1DEFGHIJKL2MNOPQRSTUV3W", "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: