public abstract class DeviceManagerClient
Reference documentation and code samples for the Cloud IoT v1 API class DeviceManagerClient.
DeviceManager client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Iot.V1Assembly
Google.Cloud.Iot.V1.dll
Remarks
Internet of Things (IoT) service. Securely connect and manage IoT devices.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the DeviceManager service, which is a host of "cloudiot.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default DeviceManager scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default DeviceManager scopes are:
GrpcClient
public virtual DeviceManager.DeviceManagerClient GrpcClient { get; }
The underlying gRPC DeviceManager client
Property Value | |
---|---|
Type | Description |
DeviceManagerDeviceManagerClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
BindDeviceToGateway(BindDeviceToGatewayRequest, CallSettings)
public virtual BindDeviceToGatewayResponse BindDeviceToGateway(BindDeviceToGatewayRequest request, CallSettings callSettings = null)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
request | BindDeviceToGatewayRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BindDeviceToGatewayResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
BindDeviceToGatewayRequest request = new BindDeviceToGatewayRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
GatewayId = "",
DeviceId = "",
};
// Make the request
BindDeviceToGatewayResponse response = deviceManagerClient.BindDeviceToGateway(request);
BindDeviceToGateway(RegistryName, string, string, CallSettings)
public virtual BindDeviceToGatewayResponse BindDeviceToGateway(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to associate with the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BindDeviceToGatewayResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
string gatewayId = "";
string deviceId = "";
// Make the request
BindDeviceToGatewayResponse response = deviceManagerClient.BindDeviceToGateway(parent, gatewayId, deviceId);
BindDeviceToGateway(string, string, string, CallSettings)
public virtual BindDeviceToGatewayResponse BindDeviceToGateway(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to associate with the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BindDeviceToGatewayResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
string gatewayId = "";
string deviceId = "";
// Make the request
BindDeviceToGatewayResponse response = deviceManagerClient.BindDeviceToGateway(parent, gatewayId, deviceId);
BindDeviceToGatewayAsync(BindDeviceToGatewayRequest, CallSettings)
public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(BindDeviceToGatewayRequest request, CallSettings callSettings = null)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
request | BindDeviceToGatewayRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBindDeviceToGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
BindDeviceToGatewayRequest request = new BindDeviceToGatewayRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
GatewayId = "",
DeviceId = "",
};
// Make the request
BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(request);
BindDeviceToGatewayAsync(BindDeviceToGatewayRequest, CancellationToken)
public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(BindDeviceToGatewayRequest request, CancellationToken cancellationToken)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
request | BindDeviceToGatewayRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBindDeviceToGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
BindDeviceToGatewayRequest request = new BindDeviceToGatewayRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
GatewayId = "",
DeviceId = "",
};
// Make the request
BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(request);
BindDeviceToGatewayAsync(RegistryName, string, string, CallSettings)
public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to associate with the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBindDeviceToGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
string gatewayId = "";
string deviceId = "";
// Make the request
BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);
BindDeviceToGatewayAsync(RegistryName, string, string, CancellationToken)
public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CancellationToken cancellationToken)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to associate with the specified gateway. The value of
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBindDeviceToGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
string gatewayId = "";
string deviceId = "";
// Make the request
BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);
BindDeviceToGatewayAsync(string, string, string, CallSettings)
public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to associate with the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBindDeviceToGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
string gatewayId = "";
string deviceId = "";
// Make the request
BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);
BindDeviceToGatewayAsync(string, string, string, CancellationToken)
public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(string parent, string gatewayId, string deviceId, CancellationToken cancellationToken)
Associates the device with the gateway.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to associate with the specified gateway. The value of
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBindDeviceToGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
string gatewayId = "";
string deviceId = "";
// Make the request
BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);
Create()
public static DeviceManagerClient Create()
Synchronously creates a DeviceManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeviceManagerClientBuilder.
Returns | |
---|---|
Type | Description |
DeviceManagerClient | The created DeviceManagerClient. |
CreateAsync(CancellationToken)
public static Task<DeviceManagerClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a DeviceManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeviceManagerClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskDeviceManagerClient | The task representing the created DeviceManagerClient. |
CreateDevice(CreateDeviceRequest, CallSettings)
public virtual Device CreateDevice(CreateDeviceRequest request, CallSettings callSettings = null)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
request | CreateDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
CreateDeviceRequest request = new CreateDeviceRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
Device = new Device(),
};
// Make the request
Device response = deviceManagerClient.CreateDevice(request);
CreateDevice(RegistryName, Device, CallSettings)
public virtual Device CreateDevice(RegistryName parent, Device device, CallSettings callSettings = null)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the device registry where this device should be created.
For example,
|
device | Device Required. The device registration details. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
Device device = new Device();
// Make the request
Device response = deviceManagerClient.CreateDevice(parent, device);
CreateDevice(string, Device, CallSettings)
public virtual Device CreateDevice(string parent, Device device, CallSettings callSettings = null)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the device registry where this device should be created.
For example,
|
device | Device Required. The device registration details. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
Device device = new Device();
// Make the request
Device response = deviceManagerClient.CreateDevice(parent, device);
CreateDeviceAsync(CreateDeviceRequest, CallSettings)
public virtual Task<Device> CreateDeviceAsync(CreateDeviceRequest request, CallSettings callSettings = null)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
request | CreateDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
CreateDeviceRequest request = new CreateDeviceRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
Device = new Device(),
};
// Make the request
Device response = await deviceManagerClient.CreateDeviceAsync(request);
CreateDeviceAsync(CreateDeviceRequest, CancellationToken)
public virtual Task<Device> CreateDeviceAsync(CreateDeviceRequest request, CancellationToken cancellationToken)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
request | CreateDeviceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
CreateDeviceRequest request = new CreateDeviceRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
Device = new Device(),
};
// Make the request
Device response = await deviceManagerClient.CreateDeviceAsync(request);
CreateDeviceAsync(RegistryName, Device, CallSettings)
public virtual Task<Device> CreateDeviceAsync(RegistryName parent, Device device, CallSettings callSettings = null)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the device registry where this device should be created.
For example,
|
device | Device Required. The device registration details. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
Device device = new Device();
// Make the request
Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);
CreateDeviceAsync(RegistryName, Device, CancellationToken)
public virtual Task<Device> CreateDeviceAsync(RegistryName parent, Device device, CancellationToken cancellationToken)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the device registry where this device should be created.
For example,
|
device | Device Required. The device registration details. The field |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
Device device = new Device();
// Make the request
Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);
CreateDeviceAsync(string, Device, CallSettings)
public virtual Task<Device> CreateDeviceAsync(string parent, Device device, CallSettings callSettings = null)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the device registry where this device should be created.
For example,
|
device | Device Required. The device registration details. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
Device device = new Device();
// Make the request
Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);
CreateDeviceAsync(string, Device, CancellationToken)
public virtual Task<Device> CreateDeviceAsync(string parent, Device device, CancellationToken cancellationToken)
Creates a device in a device registry.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the device registry where this device should be created.
For example,
|
device | Device Required. The device registration details. The field |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
Device device = new Device();
// Make the request
Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);
CreateDeviceRegistry(LocationName, DeviceRegistry, CallSettings)
public virtual DeviceRegistry CreateDeviceRegistry(LocationName parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and cloud region where this device registry must be created.
For example, |
deviceRegistry | DeviceRegistry Required. The device registry. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeviceRegistry deviceRegistry = new DeviceRegistry();
// Make the request
DeviceRegistry response = deviceManagerClient.CreateDeviceRegistry(parent, deviceRegistry);
CreateDeviceRegistry(CreateDeviceRegistryRequest, CallSettings)
public virtual DeviceRegistry CreateDeviceRegistry(CreateDeviceRegistryRequest request, CallSettings callSettings = null)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
request | CreateDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
CreateDeviceRegistryRequest request = new CreateDeviceRegistryRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
DeviceRegistry = new DeviceRegistry(),
};
// Make the request
DeviceRegistry response = deviceManagerClient.CreateDeviceRegistry(request);
CreateDeviceRegistry(string, DeviceRegistry, CallSettings)
public virtual DeviceRegistry CreateDeviceRegistry(string parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
parent | string Required. The project and cloud region where this device registry must be created.
For example, |
deviceRegistry | DeviceRegistry Required. The device registry. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DeviceRegistry deviceRegistry = new DeviceRegistry();
// Make the request
DeviceRegistry response = deviceManagerClient.CreateDeviceRegistry(parent, deviceRegistry);
CreateDeviceRegistryAsync(LocationName, DeviceRegistry, CallSettings)
public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(LocationName parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and cloud region where this device registry must be created.
For example, |
deviceRegistry | DeviceRegistry Required. The device registry. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeviceRegistry deviceRegistry = new DeviceRegistry();
// Make the request
DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);
CreateDeviceRegistryAsync(LocationName, DeviceRegistry, CancellationToken)
public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(LocationName parent, DeviceRegistry deviceRegistry, CancellationToken cancellationToken)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and cloud region where this device registry must be created.
For example, |
deviceRegistry | DeviceRegistry Required. The device registry. The field |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeviceRegistry deviceRegistry = new DeviceRegistry();
// Make the request
DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);
CreateDeviceRegistryAsync(CreateDeviceRegistryRequest, CallSettings)
public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(CreateDeviceRegistryRequest request, CallSettings callSettings = null)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
request | CreateDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
CreateDeviceRegistryRequest request = new CreateDeviceRegistryRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
DeviceRegistry = new DeviceRegistry(),
};
// Make the request
DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(request);
CreateDeviceRegistryAsync(CreateDeviceRegistryRequest, CancellationToken)
public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(CreateDeviceRegistryRequest request, CancellationToken cancellationToken)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
request | CreateDeviceRegistryRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
CreateDeviceRegistryRequest request = new CreateDeviceRegistryRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
DeviceRegistry = new DeviceRegistry(),
};
// Make the request
DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(request);
CreateDeviceRegistryAsync(string, DeviceRegistry, CallSettings)
public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(string parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
parent | string Required. The project and cloud region where this device registry must be created.
For example, |
deviceRegistry | DeviceRegistry Required. The device registry. The field |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DeviceRegistry deviceRegistry = new DeviceRegistry();
// Make the request
DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);
CreateDeviceRegistryAsync(string, DeviceRegistry, CancellationToken)
public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(string parent, DeviceRegistry deviceRegistry, CancellationToken cancellationToken)
Creates a device registry that contains devices.
Parameters | |
---|---|
Name | Description |
parent | string Required. The project and cloud region where this device registry must be created.
For example, |
deviceRegistry | DeviceRegistry Required. The device registry. The field |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DeviceRegistry deviceRegistry = new DeviceRegistry();
// Make the request
DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);
DeleteDevice(DeleteDeviceRequest, CallSettings)
public virtual void DeleteDevice(DeleteDeviceRequest request, CallSettings callSettings = null)
Deletes a device.
Parameters | |
---|---|
Name | Description |
request | DeleteDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeleteDeviceRequest request = new DeleteDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
};
// Make the request
deviceManagerClient.DeleteDevice(request);
DeleteDevice(DeviceName, CallSettings)
public virtual void DeleteDevice(DeviceName name, CallSettings callSettings = null)
Deletes a device.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
deviceManagerClient.DeleteDevice(name);
DeleteDevice(string, CallSettings)
public virtual void DeleteDevice(string name, CallSettings callSettings = null)
Deletes a device.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
deviceManagerClient.DeleteDevice(name);
DeleteDeviceAsync(DeleteDeviceRequest, CallSettings)
public virtual Task DeleteDeviceAsync(DeleteDeviceRequest request, CallSettings callSettings = null)
Deletes a device.
Parameters | |
---|---|
Name | Description |
request | DeleteDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteDeviceRequest request = new DeleteDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
};
// Make the request
await deviceManagerClient.DeleteDeviceAsync(request);
DeleteDeviceAsync(DeleteDeviceRequest, CancellationToken)
public virtual Task DeleteDeviceAsync(DeleteDeviceRequest request, CancellationToken cancellationToken)
Deletes a device.
Parameters | |
---|---|
Name | Description |
request | DeleteDeviceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteDeviceRequest request = new DeleteDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
};
// Make the request
await deviceManagerClient.DeleteDeviceAsync(request);
DeleteDeviceAsync(DeviceName, CallSettings)
public virtual Task DeleteDeviceAsync(DeviceName name, CallSettings callSettings = null)
Deletes a device.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
await deviceManagerClient.DeleteDeviceAsync(name);
DeleteDeviceAsync(DeviceName, CancellationToken)
public virtual Task DeleteDeviceAsync(DeviceName name, CancellationToken cancellationToken)
Deletes a device.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
await deviceManagerClient.DeleteDeviceAsync(name);
DeleteDeviceAsync(string, CallSettings)
public virtual Task DeleteDeviceAsync(string name, CallSettings callSettings = null)
Deletes a device.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
await deviceManagerClient.DeleteDeviceAsync(name);
DeleteDeviceAsync(string, CancellationToken)
public virtual Task DeleteDeviceAsync(string name, CancellationToken cancellationToken)
Deletes a device.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
await deviceManagerClient.DeleteDeviceAsync(name);
DeleteDeviceRegistry(DeleteDeviceRegistryRequest, CallSettings)
public virtual void DeleteDeviceRegistry(DeleteDeviceRegistryRequest request, CallSettings callSettings = null)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | DeleteDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeleteDeviceRegistryRequest request = new DeleteDeviceRegistryRequest
{
RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
};
// Make the request
deviceManagerClient.DeleteDeviceRegistry(request);
DeleteDeviceRegistry(RegistryName, CallSettings)
public virtual void DeleteDeviceRegistry(RegistryName name, CallSettings callSettings = null)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | RegistryName Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
deviceManagerClient.DeleteDeviceRegistry(name);
DeleteDeviceRegistry(string, CallSettings)
public virtual void DeleteDeviceRegistry(string name, CallSettings callSettings = null)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
deviceManagerClient.DeleteDeviceRegistry(name);
DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest, CallSettings)
public virtual Task DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest request, CallSettings callSettings = null)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | DeleteDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteDeviceRegistryRequest request = new DeleteDeviceRegistryRequest
{
RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
};
// Make the request
await deviceManagerClient.DeleteDeviceRegistryAsync(request);
DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest, CancellationToken)
public virtual Task DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest request, CancellationToken cancellationToken)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | DeleteDeviceRegistryRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteDeviceRegistryRequest request = new DeleteDeviceRegistryRequest
{
RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
};
// Make the request
await deviceManagerClient.DeleteDeviceRegistryAsync(request);
DeleteDeviceRegistryAsync(RegistryName, CallSettings)
public virtual Task DeleteDeviceRegistryAsync(RegistryName name, CallSettings callSettings = null)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | RegistryName Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
await deviceManagerClient.DeleteDeviceRegistryAsync(name);
DeleteDeviceRegistryAsync(RegistryName, CancellationToken)
public virtual Task DeleteDeviceRegistryAsync(RegistryName name, CancellationToken cancellationToken)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | RegistryName Required. The name of the device registry. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
await deviceManagerClient.DeleteDeviceRegistryAsync(name);
DeleteDeviceRegistryAsync(string, CallSettings)
public virtual Task DeleteDeviceRegistryAsync(string name, CallSettings callSettings = null)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
await deviceManagerClient.DeleteDeviceRegistryAsync(name);
DeleteDeviceRegistryAsync(string, CancellationToken)
public virtual Task DeleteDeviceRegistryAsync(string name, CancellationToken cancellationToken)
Deletes a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device registry. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
await deviceManagerClient.DeleteDeviceRegistryAsync(name);
GetDevice(DeviceName, CallSettings)
public virtual Device GetDevice(DeviceName name, CallSettings callSettings = null)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
Device response = deviceManagerClient.GetDevice(name);
GetDevice(GetDeviceRequest, CallSettings)
public virtual Device GetDevice(GetDeviceRequest request, CallSettings callSettings = null)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
request | GetDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
GetDeviceRequest request = new GetDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
FieldMask = new FieldMask(),
};
// Make the request
Device response = deviceManagerClient.GetDevice(request);
GetDevice(string, CallSettings)
public virtual Device GetDevice(string name, CallSettings callSettings = null)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
Device response = deviceManagerClient.GetDevice(name);
GetDeviceAsync(DeviceName, CallSettings)
public virtual Task<Device> GetDeviceAsync(DeviceName name, CallSettings callSettings = null)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
Device response = await deviceManagerClient.GetDeviceAsync(name);
GetDeviceAsync(DeviceName, CancellationToken)
public virtual Task<Device> GetDeviceAsync(DeviceName name, CancellationToken cancellationToken)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
Device response = await deviceManagerClient.GetDeviceAsync(name);
GetDeviceAsync(GetDeviceRequest, CallSettings)
public virtual Task<Device> GetDeviceAsync(GetDeviceRequest request, CallSettings callSettings = null)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
request | GetDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
GetDeviceRequest request = new GetDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
FieldMask = new FieldMask(),
};
// Make the request
Device response = await deviceManagerClient.GetDeviceAsync(request);
GetDeviceAsync(GetDeviceRequest, CancellationToken)
public virtual Task<Device> GetDeviceAsync(GetDeviceRequest request, CancellationToken cancellationToken)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
request | GetDeviceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
GetDeviceRequest request = new GetDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
FieldMask = new FieldMask(),
};
// Make the request
Device response = await deviceManagerClient.GetDeviceAsync(request);
GetDeviceAsync(string, CallSettings)
public virtual Task<Device> GetDeviceAsync(string name, CallSettings callSettings = null)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
Device response = await deviceManagerClient.GetDeviceAsync(name);
GetDeviceAsync(string, CancellationToken)
public virtual Task<Device> GetDeviceAsync(string name, CancellationToken cancellationToken)
Gets details about a device.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
Device response = await deviceManagerClient.GetDeviceAsync(name);
GetDeviceRegistry(GetDeviceRegistryRequest, CallSettings)
public virtual DeviceRegistry GetDeviceRegistry(GetDeviceRegistryRequest request, CallSettings callSettings = null)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | GetDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
GetDeviceRegistryRequest request = new GetDeviceRegistryRequest
{
RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
};
// Make the request
DeviceRegistry response = deviceManagerClient.GetDeviceRegistry(request);
GetDeviceRegistry(RegistryName, CallSettings)
public virtual DeviceRegistry GetDeviceRegistry(RegistryName name, CallSettings callSettings = null)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | RegistryName Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
DeviceRegistry response = deviceManagerClient.GetDeviceRegistry(name);
GetDeviceRegistry(string, CallSettings)
public virtual DeviceRegistry GetDeviceRegistry(string name, CallSettings callSettings = null)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
DeviceRegistry response = deviceManagerClient.GetDeviceRegistry(name);
GetDeviceRegistryAsync(GetDeviceRegistryRequest, CallSettings)
public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(GetDeviceRegistryRequest request, CallSettings callSettings = null)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | GetDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
GetDeviceRegistryRequest request = new GetDeviceRegistryRequest
{
RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
};
// Make the request
DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(request);
GetDeviceRegistryAsync(GetDeviceRegistryRequest, CancellationToken)
public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(GetDeviceRegistryRequest request, CancellationToken cancellationToken)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | GetDeviceRegistryRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
GetDeviceRegistryRequest request = new GetDeviceRegistryRequest
{
RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
};
// Make the request
DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(request);
GetDeviceRegistryAsync(RegistryName, CallSettings)
public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(RegistryName name, CallSettings callSettings = null)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | RegistryName Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);
GetDeviceRegistryAsync(RegistryName, CancellationToken)
public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(RegistryName name, CancellationToken cancellationToken)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | RegistryName Required. The name of the device registry. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);
GetDeviceRegistryAsync(string, CallSettings)
public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(string name, CallSettings callSettings = null)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device registry. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);
GetDeviceRegistryAsync(string, CancellationToken)
public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(string name, CancellationToken cancellationToken)
Gets a device registry configuration.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device registry. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);
GetIamPolicy(IResourceName, CallSettings)
public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = deviceManagerClient.GetIamPolicy(resource);
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = deviceManagerClient.GetIamPolicy(request);
GetIamPolicy(string, CallSettings)
public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = deviceManagerClient.GetIamPolicy(resource);
GetIamPolicyAsync(IResourceName, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(IResourceName, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await deviceManagerClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await deviceManagerClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(string, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(string, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);
ListDeviceConfigVersions(DeviceName, CallSettings)
public virtual ListDeviceConfigVersionsResponse ListDeviceConfigVersions(DeviceName name, CallSettings callSettings = null)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDeviceConfigVersionsResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
ListDeviceConfigVersionsResponse response = deviceManagerClient.ListDeviceConfigVersions(name);
ListDeviceConfigVersions(ListDeviceConfigVersionsRequest, CallSettings)
public virtual ListDeviceConfigVersionsResponse ListDeviceConfigVersions(ListDeviceConfigVersionsRequest request, CallSettings callSettings = null)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
request | ListDeviceConfigVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDeviceConfigVersionsResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
ListDeviceConfigVersionsRequest request = new ListDeviceConfigVersionsRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
NumVersions = 0,
};
// Make the request
ListDeviceConfigVersionsResponse response = deviceManagerClient.ListDeviceConfigVersions(request);
ListDeviceConfigVersions(string, CallSettings)
public virtual ListDeviceConfigVersionsResponse ListDeviceConfigVersions(string name, CallSettings callSettings = null)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDeviceConfigVersionsResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
ListDeviceConfigVersionsResponse response = deviceManagerClient.ListDeviceConfigVersions(name);
ListDeviceConfigVersionsAsync(DeviceName, CallSettings)
public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(DeviceName name, CallSettings callSettings = null)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDeviceConfigVersionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);
ListDeviceConfigVersionsAsync(DeviceName, CancellationToken)
public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(DeviceName name, CancellationToken cancellationToken)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDeviceConfigVersionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);
ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest, CallSettings)
public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest request, CallSettings callSettings = null)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
request | ListDeviceConfigVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDeviceConfigVersionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ListDeviceConfigVersionsRequest request = new ListDeviceConfigVersionsRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
NumVersions = 0,
};
// Make the request
ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(request);
ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest, CancellationToken)
public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest request, CancellationToken cancellationToken)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
request | ListDeviceConfigVersionsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDeviceConfigVersionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ListDeviceConfigVersionsRequest request = new ListDeviceConfigVersionsRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
NumVersions = 0,
};
// Make the request
ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(request);
ListDeviceConfigVersionsAsync(string, CallSettings)
public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(string name, CallSettings callSettings = null)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDeviceConfigVersionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);
ListDeviceConfigVersionsAsync(string, CancellationToken)
public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(string name, CancellationToken cancellationToken)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDeviceConfigVersionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);
ListDeviceRegistries(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistries(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists device registries.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and cloud region path. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDeviceRegistriesResponseDeviceRegistry | A pageable sequence of DeviceRegistry resources. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistries(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (DeviceRegistry item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDeviceRegistriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DeviceRegistry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DeviceRegistry> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DeviceRegistry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeviceRegistries(ListDeviceRegistriesRequest, CallSettings)
public virtual PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistries(ListDeviceRegistriesRequest request, CallSettings callSettings = null)
Lists device registries.
Parameters | |
---|---|
Name | Description |
request | ListDeviceRegistriesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDeviceRegistriesResponseDeviceRegistry | A pageable sequence of DeviceRegistry resources. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
ListDeviceRegistriesRequest request = new ListDeviceRegistriesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistries(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (DeviceRegistry item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDeviceRegistriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DeviceRegistry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DeviceRegistry> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DeviceRegistry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeviceRegistries(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistries(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists device registries.
Parameters | |
---|---|
Name | Description |
parent | string Required. The project and cloud region path. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDeviceRegistriesResponseDeviceRegistry | A pageable sequence of DeviceRegistry resources. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistries(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (DeviceRegistry item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDeviceRegistriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DeviceRegistry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DeviceRegistry> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DeviceRegistry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeviceRegistriesAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistriesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists device registries.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and cloud region path. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDeviceRegistriesResponseDeviceRegistry | A pageable asynchronous sequence of DeviceRegistry resources. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistriesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DeviceRegistry item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDeviceRegistriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DeviceRegistry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DeviceRegistry> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DeviceRegistry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeviceRegistriesAsync(ListDeviceRegistriesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistriesAsync(ListDeviceRegistriesRequest request, CallSettings callSettings = null)
Lists device registries.
Parameters | |
---|---|
Name | Description |
request | ListDeviceRegistriesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDeviceRegistriesResponseDeviceRegistry | A pageable asynchronous sequence of DeviceRegistry resources. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ListDeviceRegistriesRequest request = new ListDeviceRegistriesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistriesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DeviceRegistry item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDeviceRegistriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DeviceRegistry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DeviceRegistry> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DeviceRegistry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeviceRegistriesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistriesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists device registries.
Parameters | |
---|---|
Name | Description |
parent | string Required. The project and cloud region path. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDeviceRegistriesResponseDeviceRegistry | A pageable asynchronous sequence of DeviceRegistry resources. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistriesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DeviceRegistry item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDeviceRegistriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DeviceRegistry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DeviceRegistry> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DeviceRegistry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDevices(ListDevicesRequest, CallSettings)
public virtual PagedEnumerable<ListDevicesResponse, Device> ListDevices(ListDevicesRequest request, CallSettings callSettings = null)
List devices in a device registry.
Parameters | |
---|---|
Name | Description |
request | ListDevicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDevicesResponseDevice | A pageable sequence of Device resources. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
ListDevicesRequest request = new ListDevicesRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
DeviceNumIds = { 0UL, },
DeviceIds = { "", },
FieldMask = new FieldMask(),
GatewayListOptions = new GatewayListOptions(),
};
// Make the request
PagedEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevices(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Device item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDevicesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Device item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Device> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Device item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDevices(RegistryName, string, int?, CallSettings)
public virtual PagedEnumerable<ListDevicesResponse, Device> ListDevices(RegistryName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List devices in a device registry.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The device registry path. Required. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDevicesResponseDevice | A pageable sequence of Device resources. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
PagedEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevices(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Device item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDevicesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Device item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Device> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Device item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDevices(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListDevicesResponse, Device> ListDevices(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List devices in a device registry.
Parameters | |
---|---|
Name | Description |
parent | string Required. The device registry path. Required. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDevicesResponseDevice | A pageable sequence of Device resources. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
PagedEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevices(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Device item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDevicesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Device item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Device> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Device item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDevicesAsync(ListDevicesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListDevicesResponse, Device> ListDevicesAsync(ListDevicesRequest request, CallSettings callSettings = null)
List devices in a device registry.
Parameters | |
---|---|
Name | Description |
request | ListDevicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDevicesResponseDevice | A pageable asynchronous sequence of Device resources. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ListDevicesRequest request = new ListDevicesRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
DeviceNumIds = { 0UL, },
DeviceIds = { "", },
FieldMask = new FieldMask(),
GatewayListOptions = new GatewayListOptions(),
};
// Make the request
PagedAsyncEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevicesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Device item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDevicesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Device item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Device> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Device item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDevicesAsync(RegistryName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListDevicesResponse, Device> ListDevicesAsync(RegistryName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List devices in a device registry.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The device registry path. Required. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDevicesResponseDevice | A pageable asynchronous sequence of Device resources. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
// Make the request
PagedAsyncEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevicesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Device item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDevicesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Device item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Device> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Device item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDevicesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListDevicesResponse, Device> ListDevicesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List devices in a device registry.
Parameters | |
---|---|
Name | Description |
parent | string Required. The device registry path. Required. For example,
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDevicesResponseDevice | A pageable asynchronous sequence of Device resources. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
// Make the request
PagedAsyncEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevicesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Device item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDevicesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Device item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Device> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Device item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeviceStates(DeviceName, CallSettings)
public virtual ListDeviceStatesResponse ListDeviceStates(DeviceName name, CallSettings callSettings = null)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDeviceStatesResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
ListDeviceStatesResponse response = deviceManagerClient.ListDeviceStates(name);
ListDeviceStates(ListDeviceStatesRequest, CallSettings)
public virtual ListDeviceStatesResponse ListDeviceStates(ListDeviceStatesRequest request, CallSettings callSettings = null)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
request | ListDeviceStatesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDeviceStatesResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
ListDeviceStatesRequest request = new ListDeviceStatesRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
NumStates = 0,
};
// Make the request
ListDeviceStatesResponse response = deviceManagerClient.ListDeviceStates(request);
ListDeviceStates(string, CallSettings)
public virtual ListDeviceStatesResponse ListDeviceStates(string name, CallSettings callSettings = null)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDeviceStatesResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
ListDeviceStatesResponse response = deviceManagerClient.ListDeviceStates(name);
ListDeviceStatesAsync(DeviceName, CallSettings)
public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(DeviceName name, CallSettings callSettings = null)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDeviceStatesResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);
ListDeviceStatesAsync(DeviceName, CancellationToken)
public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(DeviceName name, CancellationToken cancellationToken)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDeviceStatesResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
// Make the request
ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);
ListDeviceStatesAsync(ListDeviceStatesRequest, CallSettings)
public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(ListDeviceStatesRequest request, CallSettings callSettings = null)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
request | ListDeviceStatesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDeviceStatesResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ListDeviceStatesRequest request = new ListDeviceStatesRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
NumStates = 0,
};
// Make the request
ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(request);
ListDeviceStatesAsync(ListDeviceStatesRequest, CancellationToken)
public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(ListDeviceStatesRequest request, CancellationToken cancellationToken)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
request | ListDeviceStatesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDeviceStatesResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ListDeviceStatesRequest request = new ListDeviceStatesRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
NumStates = 0,
};
// Make the request
ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(request);
ListDeviceStatesAsync(string, CallSettings)
public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(string name, CallSettings callSettings = null)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDeviceStatesResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);
ListDeviceStatesAsync(string, CancellationToken)
public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(string name, CancellationToken cancellationToken)
Lists the last few versions of the device state in descending order (i.e.: newest first).
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDeviceStatesResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
// Make the request
ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);
ModifyCloudToDeviceConfig(DeviceName, ByteString, CallSettings)
public virtual DeviceConfig ModifyCloudToDeviceConfig(DeviceName name, ByteString binaryData, CallSettings callSettings = null)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The configuration data for the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceConfig | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
// Make the request
DeviceConfig response = deviceManagerClient.ModifyCloudToDeviceConfig(name, binaryData);
ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest, CallSettings)
public virtual DeviceConfig ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest request, CallSettings callSettings = null)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
request | ModifyCloudToDeviceConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceConfig | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
ModifyCloudToDeviceConfigRequest request = new ModifyCloudToDeviceConfigRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
VersionToUpdate = 0L,
BinaryData = ByteString.Empty,
};
// Make the request
DeviceConfig response = deviceManagerClient.ModifyCloudToDeviceConfig(request);
ModifyCloudToDeviceConfig(string, ByteString, CallSettings)
public virtual DeviceConfig ModifyCloudToDeviceConfig(string name, ByteString binaryData, CallSettings callSettings = null)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The configuration data for the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceConfig | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
// Make the request
DeviceConfig response = deviceManagerClient.ModifyCloudToDeviceConfig(name, binaryData);
ModifyCloudToDeviceConfigAsync(DeviceName, ByteString, CallSettings)
public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(DeviceName name, ByteString binaryData, CallSettings callSettings = null)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The configuration data for the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceConfig | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
// Make the request
DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);
ModifyCloudToDeviceConfigAsync(DeviceName, ByteString, CancellationToken)
public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(DeviceName name, ByteString binaryData, CancellationToken cancellationToken)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The configuration data for the device. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceConfig | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
// Make the request
DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);
ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest, CallSettings)
public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest request, CallSettings callSettings = null)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
request | ModifyCloudToDeviceConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceConfig | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ModifyCloudToDeviceConfigRequest request = new ModifyCloudToDeviceConfigRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
VersionToUpdate = 0L,
BinaryData = ByteString.Empty,
};
// Make the request
DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(request);
ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest, CancellationToken)
public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest request, CancellationToken cancellationToken)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
request | ModifyCloudToDeviceConfigRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceConfig | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
ModifyCloudToDeviceConfigRequest request = new ModifyCloudToDeviceConfigRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
VersionToUpdate = 0L,
BinaryData = ByteString.Empty,
};
// Make the request
DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(request);
ModifyCloudToDeviceConfigAsync(string, ByteString, CallSettings)
public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(string name, ByteString binaryData, CallSettings callSettings = null)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The configuration data for the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceConfig | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
// Make the request
DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);
ModifyCloudToDeviceConfigAsync(string, ByteString, CancellationToken)
public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(string name, ByteString binaryData, CancellationToken cancellationToken)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The configuration data for the device. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceConfig | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
// Make the request
DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);
SendCommandToDevice(DeviceName, ByteString, CallSettings)
public virtual SendCommandToDeviceResponse SendCommandToDevice(DeviceName name, ByteString binaryData, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SendCommandToDeviceResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
// Make the request
SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData);
SendCommandToDevice(DeviceName, ByteString, string, CallSettings)
public virtual SendCommandToDeviceResponse SendCommandToDevice(DeviceName name, ByteString binaryData, string subfolder, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
subfolder | string Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SendCommandToDeviceResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
string subfolder = "";
// Make the request
SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData, subfolder);
SendCommandToDevice(SendCommandToDeviceRequest, CallSettings)
public virtual SendCommandToDeviceResponse SendCommandToDevice(SendCommandToDeviceRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | SendCommandToDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SendCommandToDeviceResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
SendCommandToDeviceRequest request = new SendCommandToDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
BinaryData = ByteString.Empty,
Subfolder = "",
};
// Make the request
SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(request);
SendCommandToDevice(string, ByteString, CallSettings)
public virtual SendCommandToDeviceResponse SendCommandToDevice(string name, ByteString binaryData, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SendCommandToDeviceResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
// Make the request
SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData);
SendCommandToDevice(string, ByteString, string, CallSettings)
public virtual SendCommandToDeviceResponse SendCommandToDevice(string name, ByteString binaryData, string subfolder, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
subfolder | string Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SendCommandToDeviceResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
string subfolder = "";
// Make the request
SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData, subfolder);
SendCommandToDeviceAsync(DeviceName, ByteString, CallSettings)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);
SendCommandToDeviceAsync(DeviceName, ByteString, string, CallSettings)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, string subfolder, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
subfolder | string Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
string subfolder = "";
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);
SendCommandToDeviceAsync(DeviceName, ByteString, string, CancellationToken)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, string subfolder, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
subfolder | string Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
string subfolder = "";
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);
SendCommandToDeviceAsync(DeviceName, ByteString, CancellationToken)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
name | DeviceName Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
ByteString binaryData = ByteString.Empty;
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);
SendCommandToDeviceAsync(SendCommandToDeviceRequest, CallSettings)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(SendCommandToDeviceRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | SendCommandToDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
SendCommandToDeviceRequest request = new SendCommandToDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
BinaryData = ByteString.Empty,
Subfolder = "",
};
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(request);
SendCommandToDeviceAsync(SendCommandToDeviceRequest, CancellationToken)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(SendCommandToDeviceRequest request, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
request | SendCommandToDeviceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
SendCommandToDeviceRequest request = new SendCommandToDeviceRequest
{
DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
BinaryData = ByteString.Empty,
Subfolder = "",
};
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(request);
SendCommandToDeviceAsync(string, ByteString, CallSettings)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);
SendCommandToDeviceAsync(string, ByteString, string, CallSettings)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, string subfolder, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
subfolder | string Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
string subfolder = "";
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);
SendCommandToDeviceAsync(string, ByteString, string, CancellationToken)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, string subfolder, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
subfolder | string Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
string subfolder = "";
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);
SendCommandToDeviceAsync(string, ByteString, CancellationToken)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the device. For example,
|
binaryData | ByteString Required. The command data to send to the device. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSendCommandToDeviceResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
ByteString binaryData = ByteString.Empty;
// Make the request
SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);
SetIamPolicy(IResourceName, Policy, CallSettings)
public virtual Policy SetIamPolicy(IResourceName resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = deviceManagerClient.SetIamPolicy(resource, policy);
SetIamPolicy(SetIamPolicyRequest, CallSettings)
public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = deviceManagerClient.SetIamPolicy(request);
SetIamPolicy(string, Policy, CallSettings)
public virtual Policy SetIamPolicy(string resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = deviceManagerClient.SetIamPolicy(resource, policy);
SetIamPolicyAsync(IResourceName, Policy, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(IResourceName, Policy, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CancellationToken cancellationToken)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await deviceManagerClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await deviceManagerClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(string, Policy, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(string, Policy, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CancellationToken cancellationToken)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
TestIamPermissions(IResourceName, IEnumerable<string>, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = deviceManagerClient.TestIamPermissions(resource, permissions);
TestIamPermissions(TestIamPermissionsRequest, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = deviceManagerClient.TestIamPermissions(request);
TestIamPermissions(string, IEnumerable<string>, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = deviceManagerClient.TestIamPermissions(resource, permissions);
TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(string, IEnumerable<string>, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(string, IEnumerable<string>, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Parameters | |
---|---|
Name | Description |
resource | string REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerablestring The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);
UnbindDeviceFromGateway(RegistryName, string, string, CallSettings)
public virtual UnbindDeviceFromGatewayResponse UnbindDeviceFromGateway(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to disassociate from the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UnbindDeviceFromGatewayResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
string gatewayId = "";
string deviceId = "";
// Make the request
UnbindDeviceFromGatewayResponse response = deviceManagerClient.UnbindDeviceFromGateway(parent, gatewayId, deviceId);
UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest, CallSettings)
public virtual UnbindDeviceFromGatewayResponse UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest request, CallSettings callSettings = null)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
request | UnbindDeviceFromGatewayRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UnbindDeviceFromGatewayResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
UnbindDeviceFromGatewayRequest request = new UnbindDeviceFromGatewayRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
GatewayId = "",
DeviceId = "",
};
// Make the request
UnbindDeviceFromGatewayResponse response = deviceManagerClient.UnbindDeviceFromGateway(request);
UnbindDeviceFromGateway(string, string, string, CallSettings)
public virtual UnbindDeviceFromGatewayResponse UnbindDeviceFromGateway(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to disassociate from the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UnbindDeviceFromGatewayResponse | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
string gatewayId = "";
string deviceId = "";
// Make the request
UnbindDeviceFromGatewayResponse response = deviceManagerClient.UnbindDeviceFromGateway(parent, gatewayId, deviceId);
UnbindDeviceFromGatewayAsync(RegistryName, string, string, CallSettings)
public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to disassociate from the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUnbindDeviceFromGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
string gatewayId = "";
string deviceId = "";
// Make the request
UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);
UnbindDeviceFromGatewayAsync(RegistryName, string, string, CancellationToken)
public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CancellationToken cancellationToken)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
parent | RegistryName Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to disassociate from the specified gateway. The value of
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUnbindDeviceFromGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
string gatewayId = "";
string deviceId = "";
// Make the request
UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);
UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest, CallSettings)
public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest request, CallSettings callSettings = null)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
request | UnbindDeviceFromGatewayRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUnbindDeviceFromGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
UnbindDeviceFromGatewayRequest request = new UnbindDeviceFromGatewayRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
GatewayId = "",
DeviceId = "",
};
// Make the request
UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(request);
UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest, CancellationToken)
public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest request, CancellationToken cancellationToken)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
request | UnbindDeviceFromGatewayRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUnbindDeviceFromGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
UnbindDeviceFromGatewayRequest request = new UnbindDeviceFromGatewayRequest
{
ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
GatewayId = "",
DeviceId = "",
};
// Make the request
UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(request);
UnbindDeviceFromGatewayAsync(string, string, string, CallSettings)
public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to disassociate from the specified gateway. The value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUnbindDeviceFromGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
string gatewayId = "";
string deviceId = "";
// Make the request
UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);
UnbindDeviceFromGatewayAsync(string, string, string, CancellationToken)
public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(string parent, string gatewayId, string deviceId, CancellationToken cancellationToken)
Deletes the association between the device and the gateway.
Parameters | |
---|---|
Name | Description |
parent | string Required. The name of the registry. For example,
|
gatewayId | string Required. The value of |
deviceId | string Required. The device to disassociate from the specified gateway. The value of
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUnbindDeviceFromGatewayResponse | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
string gatewayId = "";
string deviceId = "";
// Make the request
UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);
UpdateDevice(Device, FieldMask, CallSettings)
public virtual Device UpdateDevice(Device device, FieldMask updateMask, CallSettings callSettings = null)
Updates a device.
Parameters | |
---|---|
Name | Description |
device | Device Required. The new values for the device. The |
updateMask | FieldMask Required. Only updates the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
Device device = new Device();
FieldMask updateMask = new FieldMask();
// Make the request
Device response = deviceManagerClient.UpdateDevice(device, updateMask);
UpdateDevice(UpdateDeviceRequest, CallSettings)
public virtual Device UpdateDevice(UpdateDeviceRequest request, CallSettings callSettings = null)
Updates a device.
Parameters | |
---|---|
Name | Description |
request | UpdateDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Device | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
UpdateDeviceRequest request = new UpdateDeviceRequest
{
Device = new Device(),
UpdateMask = new FieldMask(),
};
// Make the request
Device response = deviceManagerClient.UpdateDevice(request);
UpdateDeviceAsync(Device, FieldMask, CallSettings)
public virtual Task<Device> UpdateDeviceAsync(Device device, FieldMask updateMask, CallSettings callSettings = null)
Updates a device.
Parameters | |
---|---|
Name | Description |
device | Device Required. The new values for the device. The |
updateMask | FieldMask Required. Only updates the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
Device device = new Device();
FieldMask updateMask = new FieldMask();
// Make the request
Device response = await deviceManagerClient.UpdateDeviceAsync(device, updateMask);
UpdateDeviceAsync(Device, FieldMask, CancellationToken)
public virtual Task<Device> UpdateDeviceAsync(Device device, FieldMask updateMask, CancellationToken cancellationToken)
Updates a device.
Parameters | |
---|---|
Name | Description |
device | Device Required. The new values for the device. The |
updateMask | FieldMask Required. Only updates the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
Device device = new Device();
FieldMask updateMask = new FieldMask();
// Make the request
Device response = await deviceManagerClient.UpdateDeviceAsync(device, updateMask);
UpdateDeviceAsync(UpdateDeviceRequest, CallSettings)
public virtual Task<Device> UpdateDeviceAsync(UpdateDeviceRequest request, CallSettings callSettings = null)
Updates a device.
Parameters | |
---|---|
Name | Description |
request | UpdateDeviceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateDeviceRequest request = new UpdateDeviceRequest
{
Device = new Device(),
UpdateMask = new FieldMask(),
};
// Make the request
Device response = await deviceManagerClient.UpdateDeviceAsync(request);
UpdateDeviceAsync(UpdateDeviceRequest, CancellationToken)
public virtual Task<Device> UpdateDeviceAsync(UpdateDeviceRequest request, CancellationToken cancellationToken)
Updates a device.
Parameters | |
---|---|
Name | Description |
request | UpdateDeviceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDevice | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateDeviceRequest request = new UpdateDeviceRequest
{
Device = new Device(),
UpdateMask = new FieldMask(),
};
// Make the request
Device response = await deviceManagerClient.UpdateDeviceAsync(request);
UpdateDeviceRegistry(DeviceRegistry, FieldMask, CallSettings)
public virtual DeviceRegistry UpdateDeviceRegistry(DeviceRegistry deviceRegistry, FieldMask updateMask, CallSettings callSettings = null)
Updates a device registry configuration.
Parameters | |
---|---|
Name | Description |
deviceRegistry | DeviceRegistry Required. The new values for the device registry. The |
updateMask | FieldMask Required. Only updates the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
DeviceRegistry deviceRegistry = new DeviceRegistry();
FieldMask updateMask = new FieldMask();
// Make the request
DeviceRegistry response = deviceManagerClient.UpdateDeviceRegistry(deviceRegistry, updateMask);
UpdateDeviceRegistry(UpdateDeviceRegistryRequest, CallSettings)
public virtual DeviceRegistry UpdateDeviceRegistry(UpdateDeviceRegistryRequest request, CallSettings callSettings = null)
Updates a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | UpdateDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeviceRegistry | The RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
// Initialize request argument(s)
UpdateDeviceRegistryRequest request = new UpdateDeviceRegistryRequest
{
DeviceRegistry = new DeviceRegistry(),
UpdateMask = new FieldMask(),
};
// Make the request
DeviceRegistry response = deviceManagerClient.UpdateDeviceRegistry(request);
UpdateDeviceRegistryAsync(DeviceRegistry, FieldMask, CallSettings)
public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(DeviceRegistry deviceRegistry, FieldMask updateMask, CallSettings callSettings = null)
Updates a device registry configuration.
Parameters | |
---|---|
Name | Description |
deviceRegistry | DeviceRegistry Required. The new values for the device registry. The |
updateMask | FieldMask Required. Only updates the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceRegistry deviceRegistry = new DeviceRegistry();
FieldMask updateMask = new FieldMask();
// Make the request
DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(deviceRegistry, updateMask);
UpdateDeviceRegistryAsync(DeviceRegistry, FieldMask, CancellationToken)
public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(DeviceRegistry deviceRegistry, FieldMask updateMask, CancellationToken cancellationToken)
Updates a device registry configuration.
Parameters | |
---|---|
Name | Description |
deviceRegistry | DeviceRegistry Required. The new values for the device registry. The |
updateMask | FieldMask Required. Only updates the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
DeviceRegistry deviceRegistry = new DeviceRegistry();
FieldMask updateMask = new FieldMask();
// Make the request
DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(deviceRegistry, updateMask);
UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest, CallSettings)
public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest request, CallSettings callSettings = null)
Updates a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | UpdateDeviceRegistryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateDeviceRegistryRequest request = new UpdateDeviceRegistryRequest
{
DeviceRegistry = new DeviceRegistry(),
UpdateMask = new FieldMask(),
};
// Make the request
DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(request);
UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest, CancellationToken)
public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest request, CancellationToken cancellationToken)
Updates a device registry configuration.
Parameters | |
---|---|
Name | Description |
request | UpdateDeviceRegistryRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeviceRegistry | A Task containing the RPC response. |
// Create client
DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateDeviceRegistryRequest request = new UpdateDeviceRegistryRequest
{
DeviceRegistry = new DeviceRegistry(),
UpdateMask = new FieldMask(),
};
// Make the request
DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(request);