Queries the information about assets that meet specified search conditions. For example, you can search for an asset by using the instance name or region of the asset.
Operation Description
You can search for assets by using search conditions, such as the instance ID, instance name, virtual private cloud (VPC) ID, region, and public IP address. You can also configure a logical relationship between multiple search conditions to search for the assets that meet the search conditions.
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The ID of the region in which the asset resides. | cn-hangzhou |
Criteria | string | No | The search conditions that are used to filter assets. The value of this parameter is in the JSON format and is case-sensitive. NoteA search condition can be an instance ID, instance name, VPC ID, region, or public IP address. You can call the DescribeCriteria operation to query the supported search conditions. | [{"name":"riskStatus","value":"YES"},{"name":"internetIp","value":"1.2.XX.XX"}] |
MachineTypes | string | No | The type of the assets that you want to query. Valid values:
| ecs |
LogicalExp | string | No | The logical relationship among multiple search conditions. Valid values:
| OR |
PageSize | integer | No | The number of entries to return on each page. Default value: 20. | 100 |
CurrentPage | integer | No | The number of the page to return. Default value: 1. | 1 |
Importance | integer | No | The importance of the asset. Valid values:
| 2 |
NoGroupTrace | boolean | No | Specifies whether to internationalize the name of the default group. Default value: false . Valid values:
| false |
Lang | string | No | The language of the content within the request and response. Default value: zh. Valid values:
| zh |
Response parameters
Example
Normal return example
JSON
Format
{
"Success": true,
"RequestId": "32A73759-4C0F-4801-BE98-901223ACEE9A",
"PageInfo": {
"CurrentPage": 1,
"PageSize": 20,
"TotalCount": 50,
"Count": 10
},
"Instances": [
{
"Status": "Running",
"CpuInfo": "Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz",
"InternetIp": "1.2.XX.XX",
"Kernel": "3.10.0-1127.19.1.el7.x86_64",
"Bind": true,
"OsName": "-",
"Tag": "InternetIp,test",
"ClientStatus": "online",
"Mem": 1024,
"VpcInstanceId": "vpc-uf60agqq65bs98zoo****",
"TagId": "121313,41412",
"Flag": 0,
"LastLoginTimestamp": 1637592907000,
"AuthVersion": 1,
"Region": "cn-hangzhou-cm***-***",
"InstanceName": "yztest-l***",
"PodCount": 1,
"VulCount": 2,
"HcStatus": "YES",
"CreatedTime": 1607365213000,
"GroupTrace": "default",
"ClusterId": "c690a0789419f4284a4e0a29e12fe****",
"RiskStatus": "NO",
"Cores": 4,
"VulStatus": "YES",
"AlarmStatus": "NO",
"MacListString": "00:13:3e:31:13:39,02:12:67:b8:**:**",
"Importance": 2,
"HealthCheckCount": 1,
"Ip": "1.2.XX.XX",
"Os": "Linux",
"AuthModifyTime": 1627974044000,
"SafeEventCount": 5,
"InstanceId": "i-m5***",
"AssetType": "0",
"IntranetIp": "1.2.XX.XX",
"Vendor": 0,
"RegionId": "cn-hanghzou",
"Uuid": "c9107c04-942f-40c1-981a-f1c1***",
"GroupId": 4120080,
"RegionName": "China (Hangzhou)",
"VendorName": "IDC",
"AuthVersionName": "Ultimate Edition",
"ClusterName": "cluster1",
"ExposedStatus": 0,
"RiskCount": "{\n \"account\": 0,\n \"appNum\": 0,\n \"asapVulCount\": 0,\n \"baselineHigh\": 0,\n \"baselineLow\": 0,\n \"baselineMedium\": 0,\n \"baselineNum\": 0,\n \"cmsNum\": 0,\n \"containerAsap\": 0,\n \"containerLater\": 0,\n \"containerNntf\": 0,\n \"containerRemind\": 0,\n \"containerSerious\": 0,\n \"containerSuspicious\": 0,\n \"cveNum\": 0,\n \"emgNum\": 0,\n \"health\": 0,\n \"imageBaselineHigh\": 0,\n \"imageBaselineLow\": 0,\n \"imageBaselineMedium\": 0,\n \"imageBaselineNum\": 0,\n \"imageMaliciousFileRemind\": 0,\n \"imageMaliciousFileSerious\": 0,\n \"imageMaliciousFileSuspicious\": 0,\n \"imageVulAsap\": 0,\n \"imageVulLater\": 0,\n \"imageVulNntf\": 0,\n \"laterVulCount\": 0,\n \"newSuspicious\": 0,\n \"nntfVulCount\": 0,\n \"remindNum\": 0,\n \"scaNum\": 0,\n \"seriousNum\": 0,\n \"suspNum\": 0,\n \"suspicious\": 0,\n \"sysNum\": 0,\n \"trojan\": 0,\n \"uuid\": \"inet-37316411-37fe-4b72-b245-346a2721****\",\n \"vul\": 0,\n \"weakPWNum\": 0\n}",
"IpListString": "172.31.XX.XX,172.171.XX.XX"
}
]
}
Error codes
Http code | Error code | Error message | Description |
---|---|---|---|
400 | AccountIdNotExist | AccountIdNotExist | - |
400 | NoPermission | no permission | - |
403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
500 | ServerError | ServerError | - |
For a list of error codes, visit the API error center.
Change history
Change time | Summary of changes | Operate | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2022-12-23 | API Description Update, The API operation is not deprecated., The error codes of the API operation has changed | |||||||||||
|