Configuration - Create Or Update

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

PUT https://fully-qualified-iothubname.azure-devices.net/configurations/{id}?api-version=2020-05-31-preview

URI Parameters

Name In Required Type Description
id
path True

string

The unique identifier of the configuration.

api-version
query True

string

Version of the Api.

Request Header

Name Required Type Description
If-Match

string

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.

Request Body

Name Type Description
content

ConfigurationContent

The content of the configuration.

createdTimeUtc

string

The creation date and time of the configuration.

etag

string

The ETag of the configuration.

id

string

The unique identifier of the configuration.

labels

object

The key-value pairs used to describe the configuration.

lastUpdatedTimeUtc

string

The update date and time of the configuration.

metrics

ConfigurationMetrics

The custom metrics specified by the developer as queries against twin reported properties.

priority

integer

The priority number assigned to the configuration.

schemaVersion

string

The schema version of the configuration.

systemMetrics

ConfigurationMetrics

The system metrics computed by the IoT Hub that cannot be customized.

targetCondition

string

The query used to define the targeted devices or modules. The query is based on twin tags and/or reported properties.

Responses

Name Type Description
200 OK

Configuration

OK.

201 Created

Configuration

Created.

Definitions

Name Description
Configuration

The configuration for Iot Hub device and module twins.

ConfigurationContent

The configuration content for devices or modules on edge devices.

ConfigurationMetrics

The configuration metrics for Iot Hub devices and modules.

Configuration

The configuration for Iot Hub device and module twins.

Name Type Description
content

ConfigurationContent

The content of the configuration.

createdTimeUtc

string

The creation date and time of the configuration.

etag

string

The ETag of the configuration.

id

string

The unique identifier of the configuration.

labels

object

The key-value pairs used to describe the configuration.

lastUpdatedTimeUtc

string

The update date and time of the configuration.

metrics

ConfigurationMetrics

The custom metrics specified by the developer as queries against twin reported properties.

priority

integer

The priority number assigned to the configuration.

schemaVersion

string

The schema version of the configuration.

systemMetrics

ConfigurationMetrics

The system metrics computed by the IoT Hub that cannot be customized.

targetCondition

string

The query used to define the targeted devices or modules. The query is based on twin tags and/or reported properties.

ConfigurationContent

The configuration content for devices or modules on edge devices.

Name Type Description
deviceContent

object

The device configuration content.

moduleContent

object

The module configuration content.

modulesContent

object

The modules configuration content.

ConfigurationMetrics

The configuration metrics for Iot Hub devices and modules.

Name Type Description
queries

object

The key-value pairs with queries and their identifier.

results

object

The results of the metrics collection queries.