ConfigurationOperations Class

ConfigurationOperations operations.

Inheritance
builtins.object
ConfigurationOperations

Constructor

ConfigurationOperations(client, config, serializer, deserializer)

Parameters

Name Description
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

Name Description
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

Name Description
id
Required
str

The unique identifier of the edge device.

content
Required

The configuration content.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description
msrest.exceptions.HttpOperationError

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

Name Description
id
Required
str

The unique identifier of the configuration.

configuration
Required

The configuration to be created or updated.

if_match
str

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.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

Configuration or ClientRawResponse if raw=true

Exceptions

Type Description
msrest.exceptions.HttpOperationError

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

Name Description
id
Required
str

The unique identifier of the configuration.

if_match
str

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 (*).

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description
msrest.exceptions.HttpOperationError

get

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

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

Parameters

Name Description
id
Required
str

The unique identifier of the configuration.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

Configuration or ClientRawResponse if raw=true

Exceptions

Type Description
msrest.exceptions.HttpOperationError

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

Name Description
top
int

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

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description
msrest.exceptions.HttpOperationError

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

Name Description
input
Required

The configuration for target condition and custom metric queries.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

ConfigurationQueriesTestResponse or ClientRawResponse if raw=true

Exceptions

Type Description
msrest.exceptions.HttpOperationError

Attributes

models

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