Google Cloud IoT Core is being retired on August 16, 2023. Contact your Google Cloud account team for more information.

Lookup registry

Stay organized with collections Save and categorize content based on your preferences.

Lookup a registry.

Code sample

Node.js

// const cloudRegion = 'us-central1';
// const projectId = 'adjective-noun-123';
// const registryId = 'my-registry';
const iot = require('@google-cloud/iot');

const iotClient = new iot.v1.DeviceManagerClient({
  // optional auth parameters.
});

const registryName = iotClient.registryPath(
  projectId,
  cloudRegion,
  registryId
);

async function getDeviceRegistry() {
  // Construct request
  const [response] = await iotClient.getDeviceRegistry({name: registryName});
  console.log(response);
}

getDeviceRegistry();

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.