Creates a diagnostic report.

Database Autonomy Service (DAS) regularly inspects all the database instances that are connected to DAS and generates health scores. This way, the running status of databases is clear at a glance.

Before you call this operation, make sure that the following conditions are met:

  • This operation is applicable to only the ApsaraDB RDS for MySQL and ApsaraDB for Redis engines.
  • When you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V4.3.3. We recommend that you use the latest version.
  • The SDK version for DAS must be V1.0.2 or later.
  • When you use the SDK to call the DAS service, you must specify the region as cn-shanghai.

Request parameters

Parameter Type Required Example Description
Action String No CreateDiagnosticReport

The operation that you want to perform. Set the value to CreateDiagnosticReport.

Uid String No hdm_df02bbfd3bd64c7bb1982e5323a6****

The account ID. On the Security Settings page under Alibaba Cloud account management, you can query the ID of the logon account.

accessKey String No None

A hidden parameter.

signature String No None

A hidden parameter.

timestamp String No None

A hidden parameter.

__context String No None

A hidden parameter.

skipAuth String No None

A hidden parameter.

UserId String No None

A hidden parameter.

DBInstanceId String No r-s****

The ID of the instance.

StartTime String No 1596177993000

The start time of the task of creating the diagnostic report. Specify the time in the UNIX timestamp format. The time must be in UTC. Unit: ms.

EndTime String No 1596177993000

The end time of the task of creating the diagnostic report. Specify the time in the UNIX timestamp format. The time must be in UTC. Unit: ms.

Note The end time of the task of creating the diagnostic report must be later than the start time of the task of creating the diagnostic report.

Response parameters

Parameter Type Example Description
Code String 200

The returned status code.

Data String { "cpuUsage": 0.00029999999999999894, "maxConnection": 32532, "slowSqlCount": 0, "exceptionTableMap": { "table_space": 1, "table_row": 1 },

The returned data.

Message String Successful

The returned message.

Note If the request is successful, Successful is returned. If the request fails, a request exception message, such as an error code, is returned.
RequestId String ac544623-f6ad-45fd-9a74-9be3db65****

The ID of the request.

Success String true

Indicates whether the request was successful.

  • true: The request was successful.
  • false: The request failed.
Synchro String None

A hidden parameter.

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=CreateDiagnosticReport
&StartTime=1608888296000
&EndTime=1608888296000
&<Common request parameters>

Sample success responses

XML format

<CreateDiagnosticReportReponse>
  <RequestId>ac544623-f6ad-45fd-9a74-9be3db65f938</RequestId>
  <Message>None</Message>
  <Synchro>None</Synchro>
  <Data></Data>
  <Code>200</Code>
  <Success>true</Success>
</CreateDiagnosticReportReponse>

JSON format

{
    "RequestId": "ac544623-f6ad-45fd-9a74-9be3db65f938",
    "Message": "None",
    "Synchro": "None",
    "Data": "",
    "Code": 200,
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.