cis data legacy resource model: query spec
The query specification has the following main constituents:
- Resource Filter: restricts (filters) the set of resources to be returned for the query. Corresponds to the
WHEREclause in SQL. Provides abilities to specify comparison predicates on the properties of the resources to search for or even on properties of their related resources as well as arbitrary compositions of such predicates. - Property Specification: specifies the properties of the filtered set of resources to be included in the result set for the query.
Each property specification begins with the fully-qualified name of the resource model that declares the property, followed by the name of the property. The property name could be either a single property name, in case of an immediate property of the resource model or a property path, i.e. chain of property names, separated with
/symbol to indicate a child property, e.g.com.acme.PersonModel/relatives/father. - Sort Criteria: defines how the final result set should be sorted by comparing the values of one or more properties of the items in the result set.
- Page Specification: specifies what portion of the final sorted result set should be returned to the client. Defined by a combination of two fields: cis.data.legacy.resource_model.query_spec.offset and cis.data.legacy.resource_model.query_spec.limit.
Representations:
"compute_total_item_count": true,
"limit": 1,
"offset": 1,
"property_spec": [
"string",
"string"
],
"resource_filter": {
"composite_filter": {
"filters": [
{
"composite_filter": {
"filters": [
null,
null
],
"operator": "INTERSECT"
},
"filter_type": "TYPE",
"property_filter": {
"comparable_boolean": true,
"comparable_double": 1.5,
"comparable_id": {
"id": "obj-103",
"type": "string"
},
"comparable_long": 1,
"comparable_string": "string",
"comparable_type": "LONG",
"operator": "EQUAL",
"property": "string"
},
"resource_id": {
"id": "obj-103",
"type": "string"
},
"resource_type": "string"
},
{
"composite_filter": {
"filters": [
null,
null
],
"operator": "INTERSECT"
},
"filter_type": "TYPE",
"property_filter": {
"comparable_boolean": true,
"comparable_double": 1.5,
"comparable_id": {
"id": "obj-103",
"type": "string"
},
"comparable_long": 1,
"comparable_string": "string",
"comparable_type": "LONG",
"operator": "EQUAL",
"property": "string"
},
"resource_id": {
"id": "obj-103",
"type": "string"
},
"resource_type": "string"
}
],
"operator": "INTERSECT"
},
"filter_type": "TYPE",
"property_filter": {
"comparable_boolean": true,
"comparable_double": 1.5,
"comparable_id": {
"id": "obj-103",
"type": "string"
},
"comparable_long": 1,
"comparable_string": "string",
"comparable_type": "LONG",
"operator": "EQUAL",
"property": "string"
},
"resource_id": {
"id": "obj-103",
"type": "string"
},
"resource_type": "string"
},
"sort_criteria": [
{
"property": "string",
"sort_direction": "ASCENDING"
},
{
"property": "string",
"sort_direction": "ASCENDING"
}
]
}
<ns0:QuerySpec xmlns:ns0="http://vmware.com/cis/data/legacy/resource_model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<limit>1</limit>
<property_spec-array>
<array-item>string</array-item>
<array-item>string</array-item>
</property_spec-array>
<sort_criteria-array>
<array-item>
<sort_direction>ASCENDING</sort_direction>
<property>string</property>
</array-item>
<array-item>
<sort_direction>ASCENDING</sort_direction>
<property>string</property>
</array-item>
</sort_criteria-array>
<compute_total_item_count>true</compute_total_item_count>
<resource_filter>
<resource_id>
<id>obj-103</id>
<type>string</type>
</resource_id>
<composite_filter>
<filters-array>
<array-item>
<resource_id>
<id>obj-103</id>
<type>string</type>
</resource_id>
<composite_filter>
<filters-array>
<array-item xsi:nil="true">
</array-item>
<array-item xsi:nil="true">
</array-item>
</filters-array>
<operator>INTERSECT</operator>
</composite_filter>
<property_filter>
<comparable_double>1.5</comparable_double>
<comparable_string>string</comparable_string>
<comparable_id>
<id>obj-103</id>
<type>string</type>
</comparable_id>
<comparable_boolean>true</comparable_boolean>
<property>string</property>
<comparable_type>LONG</comparable_type>
<comparable_long>1</comparable_long>
<operator>EQUAL</operator>
</property_filter>
<resource_type>string</resource_type>
<filter_type>TYPE</filter_type>
</array-item>
<array-item>
<resource_id>
<id>obj-103</id>
<type>string</type>
</resource_id>
<composite_filter>
<filters-array>
<array-item xsi:nil="true">
</array-item>
<array-item xsi:nil="true">
</array-item>
</filters-array>
<operator>INTERSECT</operator>
</composite_filter>
<property_filter>
<comparable_double>1.5</comparable_double>
<comparable_string>string</comparable_string>
<comparable_id>
<id>obj-103</id>
<type>string</type>
</comparable_id>
<comparable_boolean>true</comparable_boolean>
<property>string</property>
<comparable_type>LONG</comparable_type>
<comparable_long>1</comparable_long>
<operator>EQUAL</operator>
</property_filter>
<resource_type>string</resource_type>
<filter_type>TYPE</filter_type>
</array-item>
</filters-array>
<operator>INTERSECT</operator>
</composite_filter>
<property_filter>
<comparable_double>1.5</comparable_double>
<comparable_string>string</comparable_string>
<comparable_id>
<id>obj-103</id>
<type>string</type>
</comparable_id>
<comparable_boolean>true</comparable_boolean>
<property>string</property>
<comparable_type>LONG</comparable_type>
<comparable_long>1</comparable_long>
<operator>EQUAL</operator>
</property_filter>
<resource_type>string</resource_type>
<filter_type>TYPE</filter_type>
</resource_filter>
<offset>1</offset>
</ns0:QuerySpec>
Attributes:
| Name | Type | Description |
|---|---|---|
| Required | ||
| resource_filter | resource_filter | Restricts (filters) the set of resources to be returned for the query. Corresponds to the WHERE clause in SQL. Provides abilities to specify comparison predicates on the properties of the resources to search for or even on properties of their related resources as well as arbitrary compositions of such predicates. |
| Optional | ||
| property_spec | string[] | Specifies the properties of the filtered set of resources to be included in the result set for the query. Each property specification begins with the fully-qualified name of the resource model that declares the property, followed by the name of the property. The property name could be either a single property name, in case of an immediate property of the resource model or a property path, i.e. chain of property names, separated with |
| sort_criteria | sort_spec[] | Defines how the final result set should be sorted by comparing the values of one or more properties of the items in the result set. Represents a list of one or more sorting specifications, where those with lower indices in the list takes precedence over the specs with higher indices. Optional. If unset, no sorting will be applied. |
| offset | long | The offset into the result set. Must be non-negative number. If the offset is |
| limit | long | The maximum number of result items to return. Note that the service defines its own default limit that cannot be overriden here. If the specified value here is above that limit, an vapi.std.errors.invalid_argument error will be thrown for the particular query in order to indicate this violation. Optional. If unset, a default limit will be automatically assigned. |
| compute_total_item_count | boolean | Indicates whether the total number of resources that matched the query should be computed. This is meaningful only in cases where the number of resources that match the query could be more than the limit of result items to be returned as specified in cis.data.legacy.resource_model.query_spec.limit. NOTE: Use this with particular caution and only when it's absolutely needed as the computation of this value could have noticeable performance overhead. Optional. If unset, defaults to false. |