Class ProjectsResource.LocationsResource.RegistriesResource.DevicesResource
The "devices" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.CloudIot.v1
Assembly: Google.Apis.CloudIot.v1.dll
Syntax
public class ProjectsResource.LocationsResource.RegistriesResource.DevicesResource
Constructors
DevicesResource(IClientService)
Constructs a new resource.
Declaration
public DevicesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Properties
ConfigVersions
Gets the ConfigVersions resource.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.ConfigVersionsResource ConfigVersions { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.ConfigVersionsResource |
States
Gets the States resource.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.StatesResource States { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.StatesResource |
Methods
Create(Device, string)
Creates a device in a device registry.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.CreateRequest Create(Device body, string parent)
Parameters
Type | Name | Description |
---|---|---|
Device | body | The body of the request. |
string | parent | Required. The name of the device registry where this device should be created. For example,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.CreateRequest |
Delete(string)
Deletes a device.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the device. For example,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.DeleteRequest |
Get(string)
Gets details about a device.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the device. For example,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.GetRequest |
List(string)
List devices in a device registry.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.ListRequest List(string parent)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The device registry path. Required. For example,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.ListRequest |
ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest, string)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.ModifyCloudToDeviceConfigRequest ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
ModifyCloudToDeviceConfigRequest | body | The body of the request. |
string | name | Required. The name of the device. For example,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.ModifyCloudToDeviceConfigRequest |
Patch(Device, string)
Updates a device.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.PatchRequest Patch(Device body, string name)
Parameters
Type | Name | Description |
---|---|---|
Device | body | The body of the request. |
string | name | The resource path name. For example,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.PatchRequest |
SendCommandToDevice(SendCommandToDeviceRequest, string)
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.
Declaration
public virtual ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.SendCommandToDeviceRequest SendCommandToDevice(SendCommandToDeviceRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
SendCommandToDeviceRequest | body | The body of the request. |
string | name | Required. The name of the device. For example,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RegistriesResource.DevicesResource.SendCommandToDeviceRequest |