GetResourceMetadata
Retrieve the metadata for different features. For example, the metadata might indicate that a feature is turned on or off on a specific DB instance.
Request Syntax
{
"Identifier": "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.
- Identifier
-
An immutable identifier for a data source that is unique for an AWS Region. Performance Insights gathers metrics from this data source. To use a DB instance as a data source, specify its
DbiResourceId
value. For example, specifydb-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 metrics.
Type: String
Valid Values:
RDS | DOCDB
Required: Yes
Response Syntax
{
"Features": {
"string" : {
"Status": "string"
}
},
"Identifier": "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.
- Features
-
The metadata for different features. For example, the metadata might indicate that a feature is turned on or off on a specific DB instance.
Type: String to FeatureMetadata object map
Key Length Constraints: Minimum length of 0. Maximum length of 256.
Key Pattern:
.*\S.*
- Identifier
-
An immutable identifier for a data source that is unique for an AWS Region. Performance Insights gathers metrics from this data source. To use a DB instance as a data source, specify its
DbiResourceId
value. For example, specifydb-ABCDEFGHIJKLMNOPQRSTU1VW2X
.Type: String
Length Constraints: Minimum length of 0. Maximum length of 256.
Pattern:
.*\S.*
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 metadata for different features
The following example requests all metadata for the database with the ID
db-ABC1DEFGHIJKL2MNOPQRSTUV3W
. The response shows that SQL digest statistics
are enabled.
Sample Request
POST / HTTP/1.1
Host: <Hostname>
Accept-Encoding: identity
X-Amz-Target: PerformanceInsightsv20180227.GetResourceMetadata
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",
"Identifier": "db-ABC1DEFGHIJKL2MNOPQRSTUV3W"
}
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
{
"Identifier": "db-ABC1DEFGHIJKL2MNOPQRSTUV3W",
"Features":{
"SQL_DIGEST_STATISTICS":{
"Status": "ENABLED"
}
}
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: