You can call this operation to query the search conditions of specified assets.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeSearchCondition

The operation that you want to perform.

Set the value to DescribeSearchCondition

SourceIp String No 1.2.3.4

The source IP address of the request.

Lang String No zh

The language of the request and response. Valid values:

  • zh: Chinese
  • en: English
Type String No ecs

The type of the assets that you want to query. Valid values:

  • ecs: Queries all ECS instances.
  • cloud_product: Queries all cloud services.

Response parameters

Parameter Type Example Description
RequestId String 3AEC47AF-8CFA-485E-AC9A-3A8ABC06EA7F

The ID of the request.

ConditionList Array

The information about the search conditions.

Name String Running

The name of the condition.

FilterConditions String {\"filterParams\":[{\"labelKey\":\"a|b\",\"value\":\"{\\\"name\\\":\\\"sadsasd\\\",\\\"value\\\":\\\"dasdsdas\\\"}\"}],\"LogicalExp\":\"OR\"}

Filter conditions.

NameKey String stop_machine

The key value of the condition name.

ConditionType String system

The type of the condition.

Set the value:

  • system: default search conditions
  • user: custom search conditions

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeSearchCondition
&<Common request parameters>

Sample success responses

XML format

<DescribeSearchConditionResponse>
    <ConditionList>
        <FilterConditions>{"filterParams":[{"labelKey":"aaaaaaaa|bbbbbbb","value":"{\"name\":\"sadsasd\",\"value\":\"dasdsdas\"}"}],"LogicalExp":"OR"}</FilterConditions>
        <ConditionType>system</ConditionType>
        <NameKey>stop_machine</NameKey>
    </ConditionList>
    <ConditionList>
        <FilterConditions>{"filterParams":[{"labelKey":"aaaaaaaa|bbbbbbb","value":"{\"name\":\"sadsasd\",\"value\":\"dasdsdas\"}"}],"LogicalExp":"OR"}</FilterConditions>
        <ConditionType>system</ConditionType>
        <NameKey>new_machine_has_risk</NameKey>
    </ConditionList>
    <ConditionList>
        <FilterConditions>{"filterParams":[{"label":"At risk or not: At risk","value":"{\"name\":\"aaaaaa\",\"value\":\"YES\"}"}],"LogicalExp":"OR"}</FilterConditions>
        <ConditionType>user</ConditionType>
        <Name>Running</Name>
    </ConditionList>
    <requestId>3AEC47AF-8CFA-485E-AC9A-3A8ABC06EA7F</requestId>
</DescribeSearchConditionResponse>

JSON format

{
    "ConditionList": [
      {
        "FilterConditions": "{\"filterParams\":[{\"labelKey\":\"aaaaaaaa|bbbbbbb\",\"value\":\"{\\\"name\\\":\\\"sadsasd\\\",\\\"value\\\":\\\"dasdsdas\\\"}\"}],\"LogicalExp\":\"OR\"}",
        "ConditionType": "system",
        "NameKey": "stop_machine"
      },
      {
        "FilterConditions": "{\"filterParams\":[{\"labelKey\":\"aaaaaaaa|bbbbbbb\",\"value\":\"{\\\"name\\\":\\\"sadsasd\\\",\\\"value\\\":\\\"dasdsdas\\\"}\"}],\"LogicalExp\":\"OR\"}",
        "ConditionType": "system",
        "NameKey": "new_machine_has_risk"
      },
      {
        "FilterConditions": "{\"filterParams\":[{\"label\":\"At risk or not: At risk\",\"value\":\"{\\\"name\\\":\\\"aaaaaa\\\",\\\"value\\\":\\\"YES\\\"}\"}],\"LogicalExp\":\"OR\"}",
        "ConditionType": "user",
        "Name": "Running"
      },
    "requestId": "3AEC47AF-8CFA-485E-AC9A-3A8ABC06EA7F"
}

Error codes

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