Devices - Replace Module Properties
Replace module properties
Replace all property values of a module.
PUT https://{subdomain}.{baseDomain}/api/devices/{deviceId}/modules/{moduleName}/properties?api-version=2022-07-31
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
base
|
path | True |
string |
The base domain for all Azure IoT Central service requests. |
|
device
|
path | True |
string |
Unique ID of the device. |
|
module
|
path | True |
string |
Name of the device module. |
|
subdomain
|
path | True |
string |
The application subdomain. |
|
api-version
|
query | True |
string |
The version of the API being called. |
Request Body
| Name | Type | Description |
|---|---|---|
| body |
Device |
Module properties. |
Responses
| Name | Type | Description |
|---|---|---|
| 202 Accepted |
Device |
Success |
| Other Status Codes |
An error response received from the IoT Central Service. Headers x-ms-error-code: string |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Update properties of a module
Sample request
PUT https://appsubdomain.azureiotcentral.com/api/devices/mx1/modules/module_env/properties?api-version=2022-07-31
{
"componentA": {
"SensitivityDial": 200
}
}
Sample response
{
"componentA": {
"SensitivityDial": 75,
"$metadata": {
"SensitivityDial": {
"desiredValue": 200,
"desiredVersion": 3,
"ackVersion": 1,
"ackDescription": "Ok",
"ackCode": 200,
"lastUpdateTime": "2020-04-27T22:08:55.1149957Z"
}
}
}
}
Definitions
| Name | Description |
|---|---|
| Error |
The response error definition. |
|
Error |
The detail information of the error. |
Error
The response error definition.
| Name | Type | Description |
|---|---|---|
| error |
Error details for current request. |
ErrorDetails
The detail information of the error.
| Name | Type | Description |
|---|---|---|
| code |
string |
Error code. |
| message |
string |
Error message details. |
| requestId |
string |
Correlation Id for current request. |
| time |
string (date-time-rfc1123) |
The time that error request failed. |