Search code examples
azureazure-iot-hubazure-iot-edge

Change 'createOptions' of edgeAgent and edgeHub using code


Is there a way to make changes to the createOptions of the "edgeHub" module using code?

I know how to do it using the Azure Portal: Set Modules -> Runtime Settings -> CreateOptions

enter image description here

Is there an API that I could use for that?

Example: The AzureCLI has az iot edge deployment create (but it does not let me edit system modules:

az iot edge deployment create --deployment-id $deploymentId --hub-name $hubName --content $contentPath --target-condition $targetCondition --layered

Maybe the C# Client has a way to do it or there is a REST API accessible. Any ideas?


Solution

  • just use this command and you are good to go: az iot edge set-modules --device-id $deviceId --hub-name $hubName --content $deploymentFilePath Also check this link at https://learn.microsoft.com/de-de/azure/iot-edge/how-to-deploy-modules-cli