Query Instance Task Details
Function
This API is used to query the task details of an IoTDA instance.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
iotda:instance:queryTask
Read
instance *
-
g:EnterpriseProjectId
-
g:ResourceTag/<tag-key>
-
-
-
URI
GET /v5/iot/{project_id}/iotda-instances/{instance_id}/tasks/{task_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Parameter description: project ID. For details, see Obtaining a Project ID. |
|
instance_id |
Yes |
String |
Parameter description: instance ID. Value: Enter up to 36 characters, including lowercase letters (a to f), digits, and hyphens (-). |
|
task_id |
Yes |
String |
Parameter description: instance task ID. Value: Enter up to 64 characters, including lowercase letters (a to f), digits, and hyphens (-). |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
task_id |
String |
Parameter description: instance task ID. Value: Enter up to 64 characters, including lowercase letters (a to f), digits, and hyphens (-). |
|
type |
String |
Parameter description: instance task type. Range:
|
|
status |
String |
Parameter description: task status. Range:
|
|
status_detail |
String |
Parameter description: task status description. |
|
create_time |
String |
Parameter description: time when the instance task is created. Format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' |
|
start_time |
String |
Parameter description: time when the instance task starts. Format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' |
|
end_time |
String |
Parameter description: time when the instance task ends. Format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' |
|
target_config |
TargetConfig object |
The target specification of the instance. |
|
operate_window |
OperateWindow object |
Instance maintenance time window. You can specify the time window during which the specifications are modified. |
|
progress |
Integer |
Parameter description: task progress. |
|
Parameter |
Type |
Description |
|---|---|---|
|
flavor |
Flavor object |
Parameter description: specifications of an IoTDA instance. |
|
charge_mode |
String |
Parameter description: payment mode of the instance. Range:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Parameter description: specification name of the IoTDA instance to create. For details, see Specifications. |
|
size |
Integer |
Parameter description: unit number of the standard IoTDA instances to create. For details, see Specifications. This parameter is mandatory when instance_type is set to standard. |
Example Requests
Queries instance task details.
GET https://{endpoint}/v5/iot/{project_id}/iotda-instances/{instance_id}/tasks/{task_id}
Example Responses
Status code: 200
OK
{
"task_id" : "075f413d-a3bb-4243-974d-8eb9221c1234",
"type" : "MODIFY",
"status" : "PENDING",
"create_time" : "2021-08-19T01:52:49.493Z",
"start_time" : "2021-08-19T01:52:49.492Z",
"end_time" : "2021-08-19T01:52:49.492Z",
"target_config" : {
"flavor" : {
"type" : "iotda.standard.s2",
"size" : 2
}
},
"operate_window" : {
"start_time" : "18:00",
"end_time" : "22:00"
},
"progress" : 80
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot