SearchIndexPredicate

SearchIndexPredicate
SearchIndexPredicate

Since: vSphere API Release 9.1.0.0

AllOf
This class requires all of the following:
JSON Example
{
    "_typeName": "string",
    "propertyPath": "string",
    "operator": "string",
    "arrayOperator": "string",
    "comparableValue": {
        "_typeName": "string"
    },
    "comparableList": [
        {
            "_typeName": "string"
        }
    ]
}
string
propertyPath
Required

Specifies the resource model property to be compared.

Only properties of the following types may be used for comparisons in predicates:

  • boolean
  • byte
  • short
  • int
  • long
  • float
  • double
  • String
  • Enum
  • ManagedObjectReference
  • DateTime
  • URI

The property can be:

  • top level property name e.g. runtime
  • dot-separated chain of property names to indicate a child property. e.g. runtime.powerState
  • the special identifier property @moRef which will extract the corresponding identifier ManagedObjectReference of the object

If the property is an array of DataObject you can additionally:

  • index a specific object by its "key" property example with string key config.network.pnic["key-vim.host.PhysicalNic-vmnic0"] example with int key config.hardware[10]
  • get a specific property of specific object e.g. config.network.pnic["key-vim.host.PhysicalNic-vmnic0"].mac
  • use array aggregation to obtain specific properties from all elements e.g. config.network.pnic[*].mac

Please note that tupling is not supported in filters.

string
operator
Required

The operator to use for comparison of the property value.

Supported operators are listed in SearchIndexPredicateComparisonOperatorEnum.

string
arrayOperator
Optional

The operator should be used only for properties, which return an array as their value.

It specifies one of the options defined in SearchIndexPredicateArrayOperatorEnum. The operator MUST be set for array values and unset for non-array values. This operator MUST always be used in combination with operator.

comparableValue
Optional

The value against which to compare the property value.

The type of the value must be one of the types enumerated in #property.

Must be set for all comparison operators except In and NotIn.

array of Any
comparableList
Optional

The list of values to test for equality or inequality against the property value when operator In or NotIn is used.

The type of each value in the list must be one of the types enumerated in #property. The list cannot be empty.

Must be set for operator In or NotIn.