tencent cloud

DescribeDBDiagReportTasks
Last updated: 2023-10-17 10:51:56
DescribeDBDiagReportTasks
Last updated: 2023-10-17 10:51:56

1. API Description

Domain name for API request: dbbrain.tencentcloudapi.com.

This API is used to query the list of health report generation tasks.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeDBDiagReportTasks.
Version Yes String Common Params. The value used for this API: 2021-05-27.
Region No String Common Params. This parameter is not required for this API.
StartTime No Timestamp ISO8601 Start time of the first task in the format of yyyy-MM-dd HH:mm:ss, such as 2019-09-10 12:13:14. It is used for queries by time range.
EndTime No Timestamp ISO8601 End time of the last task in the format of yyyy-MM-dd HH:mm:ss, such as 2019-09-10 12:13:14. It is used for queries by time range.
InstanceIds.N No Array of String Array of instance IDs, which is used to filter the task list of the specified instance.
Sources.N No Array of String Source that triggers the task. Valid values: DAILY_INSPECTION (instance inspection), SCHEDULED (scheduled task), and MANUAL (manual trigger).
HealthLevels No String Health level. Valid values: HEALTH (healthy), SUB_HEALTH (suboptimal), RISK (risky), and HIGH_RISK (critical).
TaskStatuses No String Task status. Valid values: created (created), chosen (to be executed), running (being executed), failed (failed), and finished (completed).
Offset No Integer Offset. Default value: 0.
Limit No Integer Number of returned results. Default value: 20. Maximum value: 100.
Product No String Service type. Valid values: mysql (TencentDB for MySQL), cynosdb (TDSQL-C for MySQL). Default value: mysql.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number of tasks.
Tasks Array of HealthReportTask List of tasks.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the list of health report generation tasks

Input Example

https://dbbrain.tencentcloudapi.com/?Action=DescribeDBDiagReportTasks
&Product=mysql
&StartTime=2020-09-21T00:00:00+00:00
&EndTime=2020-09-22T00:00:00+00:00
&Sources.0=DAILY_INSPECTION
&<Common request parameters>

Output Example

{
    "Response": {
        "TotalCount": 1,
        "Tasks": [
            {
                "AsyncRequestId": 63452,
                "Source": "DAILY_INSPECTION",
                "Progress": 100,
                "CreateTime": "2020-09-21 00:00:00",
                "StartTime": "2020-09-21 00:00:00",
                "EndTime": "2020-09-21 00:00:00",
                "InstanceInfo": {
                    "InstanceId": "cdb-c9orjpes",
                    "InstanceName": "dbbrain-test",
                    "EngineVersion": "5.7",
                    "Vip": "10.207.0.10",
                    "Vport": 3306,
                    "Product": "MySQL"
                },
                "HealthStatus": {
                    "HealthScore": 100,
                    "HealthLevel": "HEALTH",
                    "ScoreLost": 0,
                    "ScoreDetails": []
                }
            }
        ],
        "RequestId": "24665720-8c93-11eb-bee6-e98cea0e6794"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure Error with CAM signature/authentication.
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameterValue Incorrect parameter value.
LimitExceeded The quota limit is exceeded.
MissingParameter Missing parameter.
OperationDenied Operation denied.
OperationDenied.UserHasNoStrategy Error with CAM authentication.
ResourceNotFound The resource does not exist.
UnauthorizedOperation The operation is unauthorized.
UnknownParameter Unknown parameter.
UnsupportedOperation Unsupported operation.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback