ConfigurationOperations Class

ConfigurationOperations operations.

Inheritance
builtins.object
ConfigurationOperations

Constructor

ConfigurationOperations(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

apply_on_edge_device

Applies the configuration content to an edge device.

create_or_update

Creates or updates a configuration on the IoT Hub for automatic device/module management. Configuration identifier and Content cannot be updated.

delete

Deletes a configuration on the IoT Hub for automatic device/module management.

get

Gets a configuration on the IoT Hub for automatic device/module management.

get_configurations

Gets configurations on the IoT Hub for automatic device/module management. Pagination is not supported.

test_queries

Validates target condition and custom metric queries for a configuration on the IoT Hub.

apply_on_edge_device

Applies the configuration content to an edge device.

apply_on_edge_device(id, content, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the edge device.

content
ConfigurationContent
Required

The configuration content.

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

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

create_or_update

Creates or updates a configuration on the IoT Hub for automatic device/module management. Configuration identifier and Content cannot be updated.

create_or_update(id, configuration, if_match=None, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the configuration.

configuration
Configuration
Required

The configuration to be created or updated.

if_match
str
default value: None

The string representing a weak ETag for the configuration, as per RFC7232. This should not be set when creating a configuration, but may be set when updating a configuration.

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

Configuration or ClientRawResponse if raw=true

Return type

Exceptions

delete

Deletes a configuration on the IoT Hub for automatic device/module management.

delete(id, if_match=None, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the configuration.

if_match
str
default value: None

The string representing a weak ETag for the configuration, as per RFC7232. The delete operation is performed only if this ETag matches the value maintained by the server, indicating that the configuration has not been modified since it was last retrieved. To force an unconditional delete, set If-Match to the wildcard character (*).

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

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

get

Gets a configuration on the IoT Hub for automatic device/module management.

get(id, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the configuration.

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

Configuration or ClientRawResponse if raw=true

Return type

Exceptions

get_configurations

Gets configurations on the IoT Hub for automatic device/module management. Pagination is not supported.

get_configurations(top=None, custom_headers=None, raw=False, **operation_config)

Parameters

top
int
default value: None

The number of configurations to retrieve. Value will be overridden if greater than the maximum deployment count for the IoT Hub.

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

test_queries

Validates target condition and custom metric queries for a configuration on the IoT Hub.

test_queries(input, custom_headers=None, raw=False, **operation_config)

Parameters

input
ConfigurationQueriesTestInput
Required

The configuration for target condition and custom metric queries.

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

ConfigurationQueriesTestResponse 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'>