Queries the details or aggregate information of a configuration inventory.
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 |
---|---|---|---|---|
oos:SearchInventory | get |
|
| none |
Request syntax
POST /SearchInventory HTTP/1.1
GET /SearchInventory HTTP/1.1
POST /SearchInventory HTTP/1.1
GET /SearchInventory HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The ID of the region. | cn-hangzhou |
NextToken | string | No | The token that is used to retrieve the next page of results. | gAAAAABfTgv5ewUWmNdJ3g7JVLvX70sPH90GZOVGC |
MaxResults | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 50. | 50 |
Filter | array<object> | No | The filter rules for the component. | |
object | No | |||
Value | array | No | The property values to query. | |
string | No | The property value to query. | i-bp1cpoxxxxxxxxxxxxxx | |
Operator | string | No | The comparison operator that is used to filter property values. Valid values of N: 1 to 5. Valid values:
| Equal |
Name | string | No | The name of the component property. Valid values of N: 1 to 5. Different components have different property names. You can call the GetInventorySchema operation to query the property names of different components. For example, the ACS:InstanceInformation component has the InstanceId property. Therefore, you can set this parameter to ACS:InstanceInformation.InstanceId. | ACS:InstanceInformation.InstanceId |
Aggregator | array | No | The information about aggregators. You can use one or more aggregators to query the aggregate information of an instance. Valid values:
| |
string | No | The aggregator. | ACS:Application.Name |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "gAAAAABfTgv5ewUWmNdJ3g7JVLvX70sPH90GZOVGC",
"RequestId": "A81E4B2E-6B33-4BAE-9856-55DB7C893E01",
"MaxResults": 50,
"Entities": [
{
"test": "test",
"test2": 1
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-01 | The internal configuration of the API is changed, but the call is not affected | View Change Details |