ProjectsLocationsRegistriesDevices
class ProjectsLocationsRegistriesDevices extends Resource (View source)
The "devices" collection of methods.
Typical usage is:
$cloudiotService = new Google\Service\CloudIot(...);
$devices = $cloudiotService->projects_locations_registries_devices;
Methods
Deletes a device. (devices.delete)
List devices in a device registry.
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata. (devices.modifyCloudToDeviceConfig)
Sends a command to the specified device. In order for a device to be able to receive commands, it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will receive commands at the top-level topic /devices/{device-id}/commands as well as commands for subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific subfolders is not supported. If the command could not be delivered to the device, this method will return an error; in particular, if the device is not subscribed, this method will return FAILED_PRECONDITION.
Details
Device
create(string $parent, Device $postBody, array $optParams = [])
Creates a device in a device registry. (devices.create)
CloudiotEmpty
delete(string $name, array $optParams = [])
Deletes a device. (devices.delete)
Device
get(string $name, array $optParams = [])
Gets details about a device. (devices.get)
ListDevicesResponse
listProjectsLocationsRegistriesDevices(string $parent, array $optParams = [])
List devices in a device registry.
(devices.listProjectsLocationsRegistriesDevices)
DeviceConfig
modifyCloudToDeviceConfig(string $name, ModifyCloudToDeviceConfigRequest $postBody, array $optParams = [])
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata. (devices.modifyCloudToDeviceConfig)
Device
patch(string $name, Device $postBody, array $optParams = [])
Updates a device. (devices.patch)
SendCommandToDeviceResponse
sendCommandToDevice(string $name, SendCommandToDeviceRequest $postBody, array $optParams = [])
Sends a command to the specified device. In order for a device to be able to receive commands, it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will receive commands at the top-level topic /devices/{device-id}/commands as well as commands for subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific subfolders is not supported. If the command could not be delivered to the device, this method will return an error; in particular, if the device is not subscribed, this method will return FAILED_PRECONDITION.
Otherwise, this method will return OK. If the subscription is QoS 1, at least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the device. (devices.sendCommandToDevice)