...
Use the following methods to create or edit a gateway:
Device create method (projects.locations.registries.devices.create) to add gateways to registries
Device patch method (projects.locations.registries.devices.patch) to edit existing gateways
...
Use the following methods to bind a device to or unbind a device from a gateway:
Registries BindDeviceToGateway method (projects.locations.registries.bindDeviceToGateway) to bind devices to gateways
Registries UnbindDeviceFromGateway method (projects.locations.registries.unbindDeviceFromGateway) to unbind devices from gateways
...
Go to the Registries page in Google Cloud console.
Click the ID of the registry for the gateway.
Click Gateways, then click the gateway's ID.
On the Gateway details page, click Bound devices.
API -
Use the Devices list method (projects.locations.registries.devices.list) and specify a gateway ID to list all devices bound to the gateway.
...
Go to the Registries page in Google Cloud console.
Click the ID of the registry for the gateway.
On the Registry details page, click Gateways to see a list of all gateways in that registry.
API -
Use the Device list method (projects.locations.registries.devices.list) to list all gateways in a registry.
...
After unbinding the device from all gateways it's bound to, use the Device delete method (projects.locations.registries.devices.delete) to delete the device.
...
After unbinding all devices from the gateway, use the Device delete method (projects.locations.registries.devices.delete) to delete the gateway, specifying the ID of the gateway you want to delete.
...