You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible to update a device configuration using IoTHubConfigurationManager.update_configuration. All requests result in Operation returned an invalid status code 'Conflict'. In the code example below, I retrieve an existing configuration, change the target_condition and then attempt to update it.
Code sample exhibiting the issue
from msrest.exceptions import HttpOperationError
from azure.iot.hub import IoTHubConfigurationManager
config_service = IoTHubConfigurationManager(iothub_conn_str)
# retrieve an existing deployment
current_config = config_service.get_configuration("my_deployment")
print(current_config)
# change the target condition
current_config.target_condition = "tags.environment='test'"
try:
config_service.update_configuration(current_config, current_config.etag)
except HttpOperationError as ex:
print(ex)
The text was updated successfully, but these errors were encountered:
Context
Description of the issue
It is not possible to update a device configuration using IoTHubConfigurationManager.update_configuration. All requests result in
Operation returned an invalid status code 'Conflict'
. In the code example below, I retrieve an existing configuration, change the target_condition and then attempt to update it.Code sample exhibiting the issue
The text was updated successfully, but these errors were encountered: