This API is used to query task information about a logical cluster.
For details, see Calling APIs.
GET /v2/{project_id}/clusters/{cluster_id}/logical-clusters/tasks
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints The value must be a valid DWS cluster ID. Range It is a 36-digit UUID. Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
offset |
No |
Integer |
Definition Page offset, which starts from 0 (page number minus 1). Constraints N/A Range Greater than or equal to 0 Default Value 0 |
limit |
No |
Integer |
Definition Size of a single page. Constraints N/A Range Greater than 0 Default Value 10 |
logical_cluster_name |
No |
String |
Definition Cluster name. Constraints N/A Range N/A Default Value N/A |
type |
No |
String |
Definition Type. Constraints N/A Range N/A Default Value N/A |
order_by |
No |
String |
Definition Sorting field. Constraints N/A Range N/A Default Value N/A |
order |
No |
String |
Definition Sorting order (ascending or descending) Constraints N/A Range ASC DESC Default Value N/A |
None
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
logical_cluster_tasks |
Array of LogicalClusterTaskInfo objects |
Definition Task information of the logical cluster. Constraints N/A Range N/A Default Value N/A |
count |
Long |
Definition Total number of the logical cluster tasks. Constraints N/A Range N/A Default Value N/A |
Parameter |
Type |
Description |
|---|---|---|
type |
String |
Definition Task type. Range N/A |
logical_cluster_name |
String |
Definition Logical cluster name. Range N/A |
start_time |
String |
Definition Task start time. Range N/A |
end_time |
String |
Definition Task end time. Range N/A |
result |
String |
Definition Task execution result. Range N/A |
log |
String |
Definition Task execution log. Range N/A |
Query task information about a logical cluster.
GET https://{Endpoint}/v2/9b06d044ea4f49f1a58b2bed2b0084bd/clusters/9b7ff56b-47b3-4d00-a1fd-4c023d34404b/logical-clusters/tasks
GET https://{Endpoint}/v2/9b06d044ea4f49f1a58b2bed2b0084bd/clusters/9b7ff56b-47b3-4d00-a1fd-4c023d34404b/logical-clusters/tasks?offset=0&limit=10&logical_cluster_name=test_logical&type=Expand&order_by=startTime&order=DESC
Status code: 200
Task information queried.
{
"logical_cluster_tasks" : [ {
"type" : "Grow",
"logical_cluster_name" : "elastic_group",
"start_time" : "2023-06-05 01:58:43",
"end_time" : "2023-06-05 02:11:50",
"result" : "success",
"log" : "Expand from outside success"
}, {
"type" : "Create",
"logical_cluster_name" : "test_logical",
"start_time" : "2023-06-21 08:35:58",
"end_time" : "2023-06-21 08:36:14",
"result" : "failed",
"log" : "list index out of range\\nChecking whether the reentry command is consistent with the previous command."
} ],
"count" : 2
}
Status Code |
Description |
|---|---|
200 |
Task information queried. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal server error. |
503 |
Service unavailable. |