Last active
June 18, 2019 00:24
-
-
Save gguuss/989ce7c3b0b7035f08f5f9c3064aefa6 to your computer and use it in GitHub Desktop.
Demo of listing registries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function listRegistries() { | |
| Logger.log('Cloud IoT Core Apps Script sample'); | |
| var projectId = 'your-project-id'; | |
| var cloudRegion = 'us-central1'; | |
| var parent = "projects/"+ projectId +"/locations/" + cloudRegion; | |
| var response = CloudIoT.Projects.Locations.Registries.list(parent); | |
| response.deviceRegistries.forEach( | |
| function(result) { | |
| console.log(result.id + '\n'); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment