Creates a diagnostic report.

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

  • If 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 version of DAS SDK must be V1.0.3 or later.
  • If you use an SDK to call the DAS service, you must set the region to cn-shanghai.
  • This operation can be used in the following database services:
    • ApsaraDB RDS for MySQL
    • PolarDB for MySQL
    • ApsaraDB for Redis

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDiagnosticReport

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

DBInstanceId String Yes rm-2ze8g2am97624****

The ID of the instance.

StartTime String Yes 1596177993000

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

EndTime String Yes 1596177993001

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

Note The end time must be later than the start time.

Response parameters

Parameter Type Example Description
RequestId String ac544623-f6ad-45fd-9a74-9be3db65****

The ID of the request.

Message String Successful

The message that is returned for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned.
Data String 70af71852fcdf2c5dc7b90596e2cf05b

The returned data.

Code String 200

The returned HTTP status code.

Success String true

Indicates whether the request is successful. Valid values:

  • true
  • false

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=CreateDiagnosticReport
&DBInstanceId=rm-2ze8g2am97624****
&StartTime=1596177993000
&EndTime=1596177993001
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDiagnosticReportResponse>
    <RequestId>ac544623-f6ad-45fd-9a74-9be3db65****</RequestId>
    <Message>Successful</Message>
    <Data>70af71852fcdf2c5dc7b90596e2cf05b</Data>
    <Code>200</Code>
    <Success>true</Success>
</CreateDiagnosticReportResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "ac544623-f6ad-45fd-9a74-9be3db65****",
  "Message" : "Successful",
  "Data" : "70af71852fcdf2c5dc7b90596e2cf05b",
  "Code" : "200",
  "Success" : "true"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidParams The request parameters are invalid. The error message returned because the specified request parameters are invalid.

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