Lookup registry

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.