Skip to content

Instantly share code, notes, and snippets.

@gguuss
Last active June 18, 2019 00:24
Show Gist options
  • Select an option

  • Save gguuss/989ce7c3b0b7035f08f5f9c3064aefa6 to your computer and use it in GitHub Desktop.

Select an option

Save gguuss/989ce7c3b0b7035f08f5f9c3064aefa6 to your computer and use it in GitHub Desktop.
Demo of listing registries
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