QueryOperations Class

QueryOperations operations.

Inheritance
builtins.object
QueryOperations

Constructor

QueryOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

api_version

Version of the Api. Constant value: "2021-04-12".

Methods

get_twins

Query an IoT Hub to retrieve information regarding device twins using a SQL-like language. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information. Pagination is supported. This returns information about device twins only.

get_twins

Query an IoT Hub to retrieve information regarding device twins using a SQL-like language. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information. Pagination is supported. This returns information about device twins only.

get_twins(query_specification, x_ms_continuation=None, x_ms_max_item_count=None, custom_headers=None, raw=False, **operation_config)

Parameters

query_specification
QuerySpecification
Required

The query string. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information.

x_ms_continuation
str
default value: None

The continuation token used to get the next page of results.

x_ms_max_item_count
str
default value: None

The maximum number of items returned per page. The service may use a different value if the value specified is not acceptable.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

list or ClientRawResponse if raw=true

Return type

Exceptions

Attributes

models

models = <module 'azure.iot.hub.protocol.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\iot\\hub\\protocol\\models\\__init__.py'>