All Products
Search
Document Center

CloudOps Orchestration Service:SearchInventory

Last Updated:Oct 14, 2024

Queries the details or aggregate information of a configuration inventory.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
oos:SearchInventoryget
  • All Resources
    *
    none
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

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region.

cn-hangzhou
NextTokenstringNo

The token that is used to retrieve the next page of results.

gAAAAABfTgv5ewUWmNdJ3g7JVLvX70sPH90GZOVGC
MaxResultsintegerNo

The number of entries per page. Valid values: 1 to 100. Default value: 50.

50
Filterarray<object>No

The filter rules for the component.

objectNo
ValuearrayNo

The property values to query.

stringNo

The property value to query.

i-bp1cpoxxxxxxxxxxxxxx
OperatorstringNo

The comparison operator that is used to filter property values. Valid values of N: 1 to 5. Valid values:

  • Equal
  • NotEqual
  • BeginWith
  • LessThan
  • GreaterThan
Equal
NamestringNo

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
AggregatorarrayNo

The information about aggregators. You can use one or more aggregators to query the aggregate information of an instance. Valid values:

  • ACS:Application.Name
  • ACS:Application.Version
stringNo

The aggregator.

ACS:Application.Name

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The token that is used to retrieve the next page of results.

gAAAAABfTgv5ewUWmNdJ3g7JVLvX70sPH90GZOVGC
RequestIdstring

The ID of the request.

A81E4B2E-6B33-4BAE-9856-55DB7C893E01
MaxResultsinteger

The number of entries returned per page.

50
Entitiesarray<object>
Entityobject

The details or aggregate information of the configuration inventory.

[ { "ACS:InstanceInformation": { "CaptureTime": "2020-10-13T08:55:06Z", "SchemaVersion": "1.0", "Content": { "PlatformName": "ubuntu", "PlatformVersion": "20.04", "Status": "Running", "InstanceId": "i-bp1cpoxxxxxxxxxxxxxx", "AgentVersion": "v1.5", "ComputerName": "iZbp1cpoxxxw111jcv94drZ", "IpAddress": "192.168.10.245", "AgentName": "oosutil", "PlatformType": "linux" }, "RegionId": "cn-hangzhou" }, "Id": "i-bp1cpoxxxxxxxxxxxxxx" } ]}

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2024-07-01The internal configuration of the API is changed, but the call is not affectedView Change Details