CreatePerformanceAnalysisReport
Creates a new performance analysis report for a specific time period for the DB instance.
Request Syntax
{
"EndTime": number
,
"Identifier": "string
",
"ServiceType": "string
",
"StartTime": number
,
"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.
- EndTime
-
The end time defined for the analysis report.
Type: Timestamp
Required: Yes
- Identifier
-
An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.
To use an Amazon RDS instance as a data source, you specify its
DbiResourceId
value. For example, specifydb-ADECBTYHKTSAUMUZQYPDS2GW4A
.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 will return metrics. Valid value is
RDS
.Type: String
Valid Values:
RDS | DOCDB
Required: Yes
- StartTime
-
The start time defined for the analysis report.
Type: Timestamp
Required: Yes
- Tags
-
The metadata assigned to the analysis report consisting of a key-value pair.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 200 items.
Required: No
Response Syntax
{
"AnalysisReportId": "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.
- AnalysisReportId
-
A unique identifier for the created analysis report.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern:
report-[0-9a-f]{17}
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
Create a performance analysis report
The following example creates a performance analysis report for the specified time period and adds the specified tag to the report.
Sample Request
POST / HTTP/1.1
Host: <Hostname>
Accept-Encoding: identity
X-Amz-Target: PerformanceInsightsv20180227.CreatePerformanceAnalysisReport
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",
"StartTime": 1689280091,
"EndTime": 1689282071,
"Tags": [{
"Key": "Name",
"Value": "MyName"
}]
}
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
{
"AnalysisReportId": "report-01234567890abcdef"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: