DescribeAdvisorResources
Retrieves the list of inspected resources. You must trigger resource information synchronization to obtain the latest results.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
advisor:DescribeAdvisorResources |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceId |
string |
No |
The resource or instance ID. |
i-2zecnwitr2s7aca6**** |
| Keyword |
string |
No |
The search keyword used to fuzzy match resource or instance IDs or names. |
ecs001 |
| Language |
string |
No |
The language of the request. |
zh |
| Product |
string |
No |
The cloud service code. |
ecs |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
566331F9-5AB3-550F-B745-A730331F97A9 |
| Data |
object |
The query results. |
|
| PageNo |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| Total |
integer |
The total number of entries. |
100 |
| Result |
object |
||
| Resource |
array<object> |
The array of query results. |
|
|
object |
The query result object. |
||
| Data |
string |
The resource details in JSON format. For more information, see the API documentation for querying instance details of the corresponding cloud service. |
{"resourceId": "i-2zecnwitr2s7aca6****","resourceName": "ecs-20230701","regionId": "cn-hangzhou",...} |
| ResourceId |
string |
The resource or instance ID. |
i-2zecnwitr2s7aca6**** |
| Product |
string |
The cloud service code. |
ecs |
| ResourceName |
string |
The resource name. |
ecs-20230701 |
| RegionId |
string |
The region information. |
cn-hangzhou |
Examples
Success response
JSON format
{
"RequestId": "566331F9-5AB3-550F-B745-A730331F97A9",
"Data": {
"PageNo": 1,
"PageSize": 10,
"Total": 100,
"Result": {
"Resource": [
{
"Data": "{\"resourceId\": \"i-2zecnwitr2s7aca6****\",\"resourceName\": \"ecs-20230701\",\"regionId\": \"cn-hangzhou\",...}",
"ResourceId": "i-2zecnwitr2s7aca6****",
"Product": "ecs",
"ResourceName": "ecs-20230701",
"RegionId": "cn-hangzhou"
}
]
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | The request processing has failed due to some unknown error. | A server error occurred. |
| 403 | Forbidden.RAM | User not authorized to operate on the specified resource, or this API doesn't support RAM. | Authentication failed. |
| 403 | Forbidden.NotActivated | User has not activated Advisor Service. | The user has not opened the Advisor product. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.