CreateSqlPatternCompareReport
Creates a SQL pattern comparison report.
Operation description
Compares two time windows and asynchronously generates a SQL pattern comparison report.
The start time of each window must be earlier than the end time, and the duration must not exceed 24 hours. Select windows of the same duration and similar business cycles.
The returned
ReportIdonly indicates that the request has been accepted. CallDescribeSqlPatternCompareReportsto query the report status, and query the details whenDetailEnabledistrue.Only one report can be generated for an instance at a time.
Reports are valid for 7 days and are isolated by instance and Alibaba Cloud account.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the instance. |
cn-beijing |
| DBClusterId |
string |
Yes |
The ID of the AnalyticDB for MySQL cluster. |
am-2ze1234567890**** |
| StartTime |
string |
Yes |
The start time of time window 1. Specify the time in UTC in the yyyy-MM-ddTHH:mmZ or yyyy-MM-ddTHH:mm:ssZ format. |
2026-09-07T00:00Z |
| EndTime |
string |
Yes |
The end time of time window 1. Specify the time in UTC in the yyyy-MM-ddTHH:mmZ or yyyy-MM-ddTHH:mm:ssZ format. |
2026-09-07T01:00Z |
| CompareStartTime |
string |
Yes |
The start time of time window 2. Specify the time in UTC in the yyyy-MM-ddTHH:mmZ or yyyy-MM-ddTHH:mm:ssZ format. |
2026-09-08T00:00Z |
| CompareEndTime |
string |
Yes |
The end time of time window 2. Specify the time in UTC in the yyyy-MM-ddTHH:mmZ or yyyy-MM-ddTHH:mm:ssZ format. |
2026-09-08T01:00Z |
| PatternType |
string |
Yes |
The report type. Valid values:
Valid values:
|
CHANGED |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response for creating a report. The report content is generated asynchronously. |
||
| ReportId |
integer |
The ID of the created report. This value only indicates that the request has been accepted. |
1001 |
| RequestId |
string |
The request ID. |
9A1B2C3D-4E5F-6789-ABCD-0123456789AB |
Examples
Success response
JSON format
{
"ReportId": 1001,
"RequestId": "9A1B2C3D-4E5F-6789-ABCD-0123456789AB"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.