Queries a list of SQL tasks.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:ListDBTaskSQLJob |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBTaskGroupId |
integer |
Yes |
The ID of the SQL task group. You can call the GetStructSyncJobDetail operation to obtain this parameter. |
132**** |
| PageNumber |
integer |
No |
The number of the page to return. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. |
20 |
| Tid |
integer |
No |
The ID of the tenant. Note
: To view the ID of the tenant, log on to the Data Management (DMS) console and move the pointer over the profile picture in the upper-right corner. For more information, see Manage DMS tenants. |
1*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
F6C47680-8D2D-43A4-8902-F2740D71A398 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| ErrorMessage |
string |
The error message returned if the request failed. |
UnknownError |
| ErrorCode |
string |
The error code returned if the request failed. |
UnknownError |
| DBTaskSQLJobList |
array<object> |
The list of the SQL tasks. |
|
|
object |
The SQL task. |
||
| JobId |
integer |
The ID of the SQL task. |
12**** |
| JobType |
string |
The type of the SQL task. |
STRUCT_SYNC |
| Comment |
string |
The description of the SQL task. |
test |
| DbSearchName |
string |
The name that is used to search for the database. |
test@xxx:3306[test] |
| DbId |
integer |
The ID of the database. |
43214523 |
| Logic |
boolean |
Indicates whether the database is a logical database. Valid values:
|
false |
| CreateTime |
string |
The time when the SQL task was created. |
2021-02-18 17:49:20 |
| LastExecTime |
string |
The time when the SQL task was last executed. |
2021-02-18 17:49:31 |
| DbTaskGroupId |
integer |
The ID of the SQL task group. |
432**** |
| Status |
string |
The state of the SQL task. Valid values:
|
SUCCESS |
| Transactional |
boolean |
Indicates whether the SQL task is executed as a transaction. Valid values:
|
false |
| TotalCount |
integer |
The total number of the SQL tasks. |
1 |
Examples
Success response
JSON format
{
"RequestId": "F6C47680-8D2D-43A4-8902-F2740D71A398",
"Success": true,
"ErrorMessage": "UnknownError",
"ErrorCode": "UnknownError",
"DBTaskSQLJobList": [
{
"JobId": 0,
"JobType": "STRUCT_SYNC",
"Comment": "test",
"DbSearchName": "test@xxx:3306[test]",
"DbId": 43214523,
"Logic": false,
"CreateTime": "2021-02-18 17:49:20",
"LastExecTime": "2021-02-18 17:49:31",
"DbTaskGroupId": 0,
"Status": "SUCCESS",
"Transactional": false
}
],
"TotalCount": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.