简体   繁体   中英

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

在此处输入图像描述

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?

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://docs.microsoft.com/de-de/azure/iot-edge/how-to-deploy-modules-cli

deployment.template.json has a key called createOptions where you can mention the same values as done in the portal. And then you can build and push your container image on container registry. After that, deployment can be done for that edge device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM