Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference Code Example for Azure IoT/Tools #255

Open
KZeronimo opened this issue Oct 13, 2022 · 4 comments
Open

Reference Code Example for Azure IoT/Tools #255

KZeronimo opened this issue Oct 13, 2022 · 4 comments

Comments

@KZeronimo
Copy link

@jamesadevine would it be possible to see how the IoTC hub endpoints are surfaced

@jamesadevine
Copy link
Contributor

Hey @KZeronimo!

What specifically are you interested in consuming/having visibility on from IoTHub?

@KZeronimo
Copy link
Author

Hi @jamesadevine I would like to see the internals of the tool if possible

We have automation that creates IoTC applications, and we would like to output the DPS Scope Id and 10 IoTH endpoints that comprise the IoTC application so that our Azure Sphere device enablement team can whitelist appropriately.

I suppose we could attempt to fire the ShowIoTCentralConfig.exe from our automation pipeline

The key question I have at the moment is there a way to reveal the DPS Scope Id given the IoTC application URL as the only input - I notice ShowIoTCentralConfig.exe takes Scope Id as an input I would like that to be an output if possible.

@KZeronimo
Copy link
Author

KZeronimo commented Oct 19, 2022

Hi, @jamesadevine I was playing around a bit with ShowIoTCentralConfig.exe - the tool is built interactive which is great; however, it would be nice to have a non-interactive mode to support automation use cases.

My goal is to be able to acquire the DPS Scope Id and 10 IoTH endpoints associated with an IoTC application in an automation pipeline and reduce the manual steps required to get the information needed to add to app_manifest.json

One viable option is to build an input file "iotcapp.txt"

n
https://<iotcapphost>.azureiotcentral.com/
SharedAccessSignature sr=...
scopeid

And then Get-Content iotcapp.txt | .\ShowIoTCentralConfig.exe

@jamesadevine
Copy link
Contributor

Hi @KZeronimo!

Sorry for the delay.

Hi, @jamesadevine I was playing around a bit with ShowIoTCentralConfig.exe - the tool is built interactive which is great; however, it would be nice to have a non-interactive mode to support automation use cases.

Absolutely agree, we will take a look at this.

My goal is to be able to acquire the DPS Scope Id and 10 IoTH endpoints associated with an IoTC application in an automation pipeline and reduce the manual steps required to get the information needed to add to app_manifest.json

Completely understand. Out of curiosity, what pipeline technology are you using? GitHub Actions, ADO, other?

One viable option is to build an input file "iotcapp.txt"

Yup, we can look at this. Is there any reason why you prefer an input text file rather than parameters to the exe?

The one drawback is that it is currently not possible to obtain the scope ID from IoTC programmatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants