tencent cloud

Feedback

DescribeTask

Last updated: 2024-12-02 14:41:55

1. API Description

Domain name for API request: cfg.intl.tencentcloudapi.com.

This API is used to query a task.

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: DescribeTask.
Version Yes String Common Params. The value used for this API: 2021-08-20.
Region No String Common Params. This parameter is not required.
TaskId Yes Integer Task ID

3. Output Parameters

Parameter Name Type Description
Task Task Task information
ReportInfo TaskReportInfo Experiment report information corresponding to the task. The value null indicates that no report is exported.
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying Experiments

Input Example

POST / HTTP/1.1
Host: cfg.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTask
<Common request parameters>



{
    "TaskId": 0
}

Output Example

{
    "Response": {
        "ReportInfo": null,
        "RequestId": "68da5328-ff1f-4320-92c0-a67e65c8a298",
        "Task": {
            "AlarmPolicy": [],
            "ApmServiceList": [
                {
                    "InstanceId": "test-ins",
                    "RegionId": 1,
                    "ServiceNameList": [
                        "test-service"
                    ]
                }
            ],
            "ApplicationId": "",
            "ApplicationName": "",
            "Tags": [],
            "TaskCreateTime": "2023-10-09 10:55:18",
            "TaskDescription": "Testing",
            "TaskEndTime": null,
            "TaskExpect": null,
            "TaskGroups": [
                {
                    "ObjectTypeId": 1,
                    "TaskGroupActions": [
                        {
                            "ActionApiType": 1,
                            "ActionAttribute": 1,
                            "ActionId": 1,
                            "ActionRisk": "High risk",
                            "ActionTitle": "Shutdown (testing)",
                            "ActionType": "Platform",
                            "IsExecuteRedo": false,
                            "TaskGroupActionCreateTime": "2023-10-09 10:55:18",
                            "TaskGroupActionCustomConfiguration": "{}",
                            "TaskGroupActionExecuteId": null,
                            "TaskGroupActionExecuteTime": null,
                            "TaskGroupActionGeneralConfiguration": "{\"AliasTitle\": \"\", \"PreTimeWait\": 0, \"ActionTimeout\": 1800, \"AfterTimeWait\": 0}",
                            "TaskGroupActionId": 13785,
                            "TaskGroupActionOrder": 1,
                            "TaskGroupActionRandomId": 457181,
                            "TaskGroupActionRecoverId": 355514,
                            "TaskGroupActionStatus": 2001,
                            "TaskGroupActionStatusType": 0,
                            "TaskGroupActionUpdateTime": "2023-10-09 10:55:18",
                            "TaskGroupInstances": []
                        },
                        {
                            "ActionApiType": 1,
                            "ActionAttribute": 2,
                            "ActionId": 2,
                            "ActionRisk": "High Risk",
                            "ActionTitle": "Start",
                            "ActionType": "Platform",
                            "IsExecuteRedo": false,
                            "TaskGroupActionCreateTime": "2023-10-09 10:55:18",
                            "TaskGroupActionCustomConfiguration": "{}",
                            "TaskGroupActionExecuteId": 457181,
                            "TaskGroupActionExecuteTime": null,
                            "TaskGroupActionGeneralConfiguration": "{\"PreTimeWait\": 0, \"ActionTimeout\": 1800, \"AfterTimeWait\": 0}",
                            "TaskGroupActionId": 13786,
                            "TaskGroupActionOrder": 2,
                            "TaskGroupActionRandomId": 355514,
                            "TaskGroupActionRecoverId": null,
                            "TaskGroupActionStatus": 2001,
                            "TaskGroupActionStatusType": 0,
                            "TaskGroupActionUpdateTime": "2023-10-09 10:55:18",
                            "TaskGroupInstances": []
                        }
                    ],
                    "TaskGroupCreateTime": "2023-10-09 10:55:18",
                    "TaskGroupDescription": "1",
                    "TaskGroupDiscardInstanceList": [],
                    "TaskGroupId": 6454,
                    "TaskGroupInstanceList": [
                        "ins-knq6h3r8",
                        "ins-61eitwrk",
                        "ins-d2e45nba"
                    ],
                    "TaskGroupInstancesExecuteRule": [
                        {
                            "TaskGroupInstancesExecuteMode": 3,
                            "TaskGroupInstancesExecuteNum": 2,
                            "TaskGroupInstancesExecutePercent": 100
                        }
                    ],
                    "TaskGroupMode": 1,
                    "TaskGroupOrder": 1,
                    "TaskGroupSelectedInstanceList": [],
                    "TaskGroupTitle": "1",
                    "TaskGroupUpdateTime": "2023-10-09 10:55:18"
                }
            ],
            "TaskId": 5417,
            "TaskMode": 1,
            "TaskMonitors": [
                {
                    "InstancesIds": [
                        "ins-knq6h3r8",
                        "ins-61eitwrk",
                        "ins-d2e45nba"
                    ],
                    "MetricChineseName": "Check CPU utilization",
                    "MetricId": 614,
                    "MetricName": "CpuUsage",
                    "TaskMonitorId": 5850,
                    "TaskMonitorObjectTypeId": 1,
                    "Unit": "%"
                }
            ],
            "TaskOwnerUin": "700000174829",
            "TaskPauseDuration": 60,
            "TaskPlanId": null,
            "TaskPlanTitle": null,
            "TaskPolicy": null,
            "TaskProtectStrategy": null,
            "TaskRegionId": 1,
            "TaskStartTime": null,
            "TaskStatus": 1001,
            "TaskStatusType": 0,
            "TaskSummary": null,
            "TaskTag": "",
            "TaskTitle": "Testing",
            "TaskUpdateTime": "2023-10-09 10:55:18"
        }
    }
}

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 CAM signature/authentication error.
DryRunOperation DryRun operation means the request will be successful, but the DryRun parameter is passed.
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Parameter error.
InvalidParameterValue Parameter value error.
LimitExceeded The quota limit is exceeded.
MissingParameter Parameters are missing
OperationDenied The operation is rejected.
RequestLimitExceeded The number of requests exceeds the frequency limit.
ResourceInUse Resources are occupied.
ResourceInsufficient Insufficient resources.
ResourceNotFound Resources do not exist.
ResourceUnavailable Resources are unavailable.
ResourcesSoldOut Resources are sold out.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter.
UnsupportedOperation The operation is not supported.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support