tencent cloud

智能顾问

产品动态
产品简介
产品概述
功能介绍
产品优势
应用场景
客户案例
购买指南
快速入门
使用智能顾问进行混沌演练
操作指南
智能顾问-云架构操作指南
智能顾问-云巡检操作指南
智能顾问-混沌演练操作指南
智能顾问-数字资产操作指南
权限管理
API 文档
History
Introduction
API Category
Making API Requests
Other APIs
Task APIs
Cloud Architecture Console APIs
Data Types
Error Codes
常见问题
智能顾问常见问题
智能顾问-云巡检常见问题
智能顾问-云架构常见问题
智能顾问-混沌演练常见问题
相关协议
Tencent Cloud Smart Advisor Service Level Agreement
PRIVACY POLICY MODULE CHAOTIC FAULT GENERATOR
DATA PRIVACY AND SECURITY AGREEMENT MODULE CHAOTIC FAULT GENERATOR
联系我们
文档智能顾问API 文档Task APIsDescribeTaskStrategyRisks

DescribeTaskStrategyRisks

聚焦模式
字号
最后更新时间: 2025-10-30 21:26:07

1. API Description

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

This API is used to query the risky instance list of the assessment item.

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: DescribeTaskStrategyRisks.
Version Yes String Common Params. The value used for this API: 2020-07-21.
Region No String Common Params. This parameter is not required.
StrategyId Yes Integer Assessment item ID
Limit No Integer Quantity of returns. It is 100 by default, and the maximum value is 200.
Offset No Integer Offset, which is 0 by default.
Env No String Environment
TaskType No String Task type

3. Output Parameters

Parameter Name Type Description
RiskFieldsDesc Array of RiskFieldsDesc According to this configuration, match the corresponding fields of the risky instance list (Risks), for example:
{"Response":{"RequestId":"111","RiskFieldsDesc":[{"Field":"InstanceId","FieldName":"ID","FieldType":"string","FieldDict":{} },{"Field":"InstanceName","FieldName":"Name","FieldType":"string","FieldDict":{}},{"Field":"InstanceState","FieldName":"Status ","FieldType":"string","FieldDict":{"LAUNCH_FAILED":"Creation failed","PENDING":"Creating","REBOOTING":"Re- starting","RUNNING":"Running","SHUTDOWN":"Stop waiting to be terminated","STARTING":"Starting","STOPPED":"Shut down","STOPPING":"Shutting down"," TERMINATING":"Terminating"}},{"Field":"Zone","FieldName":"Available zone","FieldType":"string","FieldDict":{}},{"Field":" PrivateIPAddresses","FieldName":"Private IP addresses","FieldType":"stringSlice","FieldDict":{}},{"Field":"PublicIPAddresses","FieldName":"Public IP addresses","Field Type":"stringSlice","FieldDict":{}},{"Field":"Region","FieldName":"Region","FieldType":"string","FieldDict":{}},{" Field":"Tags","FieldName":"Tags","FieldType":"tags","FieldDict":{}}],"RiskTotalCount":3,"Risks":"[{"InstanceId" :"ins-xxx1","InstanceName":"xxx1","InstanceState":"RUNNING","PrivateIPAddresses":["1.17.64.2"],\ " PublicIPAddresses":null,"Region":"ap-shanghai","Tags":null,"Zone":"ap-shanghai-2"},{"InstanceId\ ":"ins-xxx2","InstanceName":"xxx2","InstanceState":"RUNNING","PrivateIPAddresses":["1.17.64.11"], "PublicIPAddresses":null,"Region":"ap-shanghai","Tags":null,"Zone":"ap-shanghai-2"}]"," StrategyId":9}}
Note: This field may return null, indicating that no valid values can be obtained.
StrategyId Integer Assessment item ID
Note: This field may return null, indicating that no valid values can be obtained.
RiskTotalCount Integer Number of risky instances
Note: This field may return null, indicating that no valid values can be obtained.
Risks String Risky instance details list. Require json decode.
Note: This field may return null, indicating that no valid values can be obtained.
ResourceCount Integer Number of inspection resources
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 the Risky Instance List of the Assessment Item

Input Example

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

{
    "StrategyId": 9
}

Output Example

{
    "Response": {
        "RequestId": "111",
        "RiskFieldsDesc": [
            {
                "Field": "InstanceId",
                "FieldName": "ID",
                "FieldType": "string",
                "FieldDict": {}
            },
            {
                "Field": "InstanceName",
                "FieldName": "Name",
                "FieldType": "string",
                "FieldDict": {}
            },
            {
                "Field": "InstanceState",
                "FieldName": "Status",
                "FieldType": "string",
                "FieldDict": {}
            },
            {
                "Field": "Zone",
                "FieldName": "Availability zone",
                "FieldType": "string",
                "FieldDict": {}
            },
            {
                "Field": "PrivateIPAddresses",
                "FieldName": "Private IP addresses",
                "FieldType": "stringSlice",
                "FieldDict": {}
            },
            {
                "Field": "PublicIPAddresses",
                "FieldName": "Public IP addresses",
                "FieldType": "stringSlice",
                "FieldDict": {}
            },
            {
                "Field": "Region",
                "FieldName": "Region",
                "FieldType": "string",
                "FieldDict": {}
            },
            {
                "Field": "Tags",
                "FieldName": "Tags",
                "FieldType": "tags",
                "FieldDict": {}
            }
        ],
        "RiskTotalCount": 3,
        "ResourceCount": 10,
        "Risks": "[{\"InstanceId\":\"ins-xxx1\",\"InstanceName\":\"xxx1\",\"InstanceState\":\"RUNNING\",\"PrivateIPAddresses\":[\"1.17.64.2\"],\"PublicIPAddresses\":null,\"Region\":\"ap-shanghai\",\"Tags\":null,\"Zone\":\"ap-shanghai-2\"},{\"InstanceId\":\"ins-xxx2\",\"InstanceName\":\"xxx2\",\"InstanceState\":\"RUNNING\",\"PrivateIPAddresses\":[\"1.17.64.11\"],\"PublicIPAddresses\":null,\"Region\":\"ap-shanghai\",\"Tags\":null,\"Zone\":\"ap-shanghai-2\"}]",
        "StrategyId": 9
    }
}

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
InternalError Internal error
InternalError.DependsDb The dependent db encountered an error.
InternalError.System System error
InvalidParameter Parameter error
InvalidParameter.ParamError Parameter error
InvalidParameterValue Parameter value error
ResourceNotFound The resource does not exist.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈