Queries cloud service assets.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-sas:ListCloudAssetInstances | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The region ID of the instance. | cn-hangzhou |
Criteria | string | No | The search conditions for assets. The value of this parameter is in the JSON format and contains the following fields:
Note
You can call the GetCloudAssetCriteria operation to query supported search conditions.
| [{\"name\":\"internetIp\",\"value\":\"192.168\",\"logicalExp\":\"OR\"}] |
LogicalExp | string | No | The logical relation for multiple search conditions. Valid values:
| OR |
PageSize | integer | No | The number of entries to return on each page. Maximum value: 100. Default value: 20. | 20 |
CurrentPage | integer | No | The number of the page to return. | 2 |
CloudAssetTypes | array<object> | No | The details of the cloud asset. | |
object | No | The cloud service asset. | ||
AssetType | integer | No | The type of the cloud asset. You can call the GetCloudAssetCriteria operation to query the cloud asset type. | 18 |
AssetSubType | integer | No | The subtype of the cloud asset. You can call the GetCloudAssetCriteria operation to query the subtype of the cloud asset. | 0 |
Vendor | integer | No | The server type. Valid values:
| 0 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Success": true,
"RequestId": "028CF634-5268-5660-9575-48C9ED6BF880",
"PageInfo": {
"CurrentPage": 2,
"PageSize": 100,
"TotalCount": 69,
"Count": 20
},
"Instances": [
{
"RegionId": "cn-hanghzou",
"Vendor": 0,
"AssetType": 0,
"AssetSubType": "0",
"InstanceId": "d-uf60vevzkztnflx7cny5",
"InstanceName": "yztest-l***",
"CreatedTime": 1607365213000,
"InternetIp": "1.2.XX.XX",
"AlarmStatus": "NO",
"RiskStatus": "NO",
"AssetTypeName": "ECS",
"AssetSubTypeName": "SECURITY_GROUP",
"SecurityInfo": "{\"seriousNum\":0,\"appNum\":0,\"baselineMedium\":0,\"remindNum\":0,\"imageVulNntf\":0,\"cveNum\":0,\"vul\":0,\"uuid\":\"yuejia-test\",\"emgNum\":0,\"weakPWNum\":0,\"imageMaliciousFileRemind\":0,\"imageBaselineMedium\":0,\"laterVulCount\":0,\"cmsNum\":0,\"imageMaliciousFileSerious\":0,\"agentlessMalicious\":0,\"suspNum\":0,\"imageBaselineHigh\":0,\"asapVulCount\":0,\"imageVulLater\":0,\"agentlessAll\":0,\"sysNum\":0,\"containerLater\":0,\"containerSuspicious\":0,\"imageBaselineNum\":0,\"newSuspicious\":0,\"nntfVulCount\":0,\"scaNum\":0,\"containerNntf\":0,\"health\":0,\"trojan\":0,\"suspicious\":0,\"imageMaliciousFileSuspicious\":0,\"containerRemind\":0,\"baselineLow\":0,\"imageVulAsap\":0,\"imageBaselineLow\":0,\"containerAsap\":0,\"agentlessBaseline\":0,\"agentlessVulSca\":0,\"agentlessVulCve\":0,\"containerSerious\":0,\"baselineHigh\":0,\"account\":0,\"baselineNum\":5}"
}
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | AccountIdNotExist | AccountId not exist | - |
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 Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-20 | The Error code has changed | View Change Details |