Queries all properties or a combination of properties of a component.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer automatically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SearchInventory

The operation that you want to perform. Set the value to SearchInventory.

RegionId String No cn-hangzhou

The ID of the region.

Filter.N.Name String No ACS:InstanceInformation.InstanceId

The name of the component property. Valid values of N: 1 to 5. Different components have different properties. 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.

Filter.N.Operator String No Equal

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

Valid values:

  • Equal
  • NotEqual
  • BeginWith
  • LessThan
  • GreaterThan
Filter.N.Value.N RepeatList No i-bp1cpoxxxxxxxxxxxxxx

The value of the property. Valid values of the first N: 1 to 5. Valid values of the second N: 1 to 20.

Aggregator.N RepeatList No ACS:Application.Name

The combination of properties. Only the specified one or more properties are returned.

Valid values:

  • ACS:Application.Name
  • ACS:Application.Version
NextToken String No gAAAAABfTgv5ewUWmNdJ3g7JVLvX70sPH90GZOVGC

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

MaxResults Integer No 50

The number of entries to return on each page. Valid values: 1 to 100. Default value: 50.

Response parameters

Parameter Type Example Description
Entities List [ { "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" } ]}

The properties of the component.

MaxResults Integer 50

The number of entries returned per page.

NextToken String gAAAAABfTgv5ewUWmNdJ3g7JVLvX70sPH90GZOVGC

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

RequestId String A81E4B2E-6B33-4BAE-9856-55DB7C893E01

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=SearchInventory
&Filter.0.Name=ACS:InstanceInformation.InstanceId
&Filter.0.Operator=Equal
&Filter.0.Value.0=i-bp1cpoxxxxxxxxxxxxxx
&Aggregator.0=ACS:Application.Name
&Aggregator.1=ACS:Application.Version
&<Common request parameters>

Sample success responses

XML format

<RequestId>5B694097-E7C7-4231-858C-B979CEC3A0AC</RequestId>
<MaxResults>50</MaxResults>
<Entities>
    <Data>
        <ACS:Application>
            <Content>
                <ACS:Application.Name>NetworkManager</ACS:Application.Name>
                <ACS:Application.Version>1.22.8</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>NetworkManager-libnm</ACS:Application.Name>
                <ACS:Application.Version>1.22.8</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>NetworkManager-team</ACS:Application.Name>
                <ACS:Application.Version>1.22.8</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>NetworkManager-tui</ACS:Application.Name>
                <ACS:Application.Version>1.22.8</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>PackageKit</ACS:Application.Name>
                <ACS:Application.Version>1.1.12</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>PackageKit-glib</ACS:Application.Name>
                <ACS:Application.Version>1.1.12</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>abattis-cantarell-fonts</ACS:Application.Name>
                <ACS:Application.Version>0.0.25</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>acl</ACS:Application.Name>
                <ACS:Application.Version>2.2.53</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>adcli</ACS:Application.Name>
                <ACS:Application.Version>0.8.2</ACS:Application.Version>
                <Count>1</Count>
            </Content>
            <Content>
                <ACS:Application.Name>aliyun_assist</ACS:Application.Name>
                <ACS:Application.Version>1.0.2.493</ACS:Application.Version>
                <Count>1</Count>
            </Content>
        </ACS:Application>
    </Data>
</Entities>

JSON format

{
	"RequestId": "5B694097-E7C7-4231-858C-B979CEC3A0AC",
	"MaxResults": 50,
	"Entities": [
		{
			"Data": {
				"ACS:Application": {
					"Content": [
						{
							"ACS:Application.Name": "NetworkManager",
							"ACS:Application.Version": "1.22.8",
							"Count": 1
						},
						{
							"ACS:Application.Name": "NetworkManager-libnm",
							"ACS:Application.Version": "1.22.8",
							"Count": 1
						},
						{
							"ACS:Application.Name": "NetworkManager-team",
							"ACS:Application.Version": "1.22.8",
							"Count": 1
						},
						{
							"ACS:Application.Name": "NetworkManager-tui",
							"ACS:Application.Version": "1.22.8",
							"Count": 1
						},
						{
							"ACS:Application.Name": "PackageKit",
							"ACS:Application.Version": "1.1.12",
							"Count": 1
						},
						{
							"ACS:Application.Name": "PackageKit-glib",
							"ACS:Application.Version": "1.1.12",
							"Count": 1
						},
						{
							"ACS:Application.Name": "abattis-cantarell-fonts",
							"ACS:Application.Version": "0.0.25",
							"Count": 1
						},
						{
							"ACS:Application.Name": "acl",
							"ACS:Application.Version": "2.2.53",
							"Count": 1
						},
						{
							"ACS:Application.Name": "adcli",
							"ACS:Application.Version": "0.8.2",
							"Count": 1
						},
						{
							"ACS:Application.Name": "aliyun_assist",
							"ACS:Application.Version": "1.0.2.493",
							"Count": 1
						}
					]
				}
			}
		}
	]
}

Error codes

For a list of error codes, visit the API Error Center.