DeviceManagerClient(
transport=None,
channel=None,
credentials=None,
client_config=None,
client_info=None,
client_options=None,
)
Internet of Things (IoT) service. Securely connect and manage IoT devices.
Inheritance
builtins.object > google.cloud.iot_v1.gapic.device_manager_client.DeviceManagerClient > DeviceManagerClientMethods
DeviceManagerClient
DeviceManagerClient(
transport=None,
channel=None,
credentials=None,
client_config=None,
client_info=None,
client_options=None,
)
Constructor.
Name | Description |
channel |
grpc.Channel
DEPRECATED. A |
credentials |
google.auth.credentials.Credentials
The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to |
client_config |
dict
DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used. |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
client_options |
Union[dict, google.api_core.client_options.ClientOptions]
Client options used to set user options on the client. API Endpoint should be set through client_options. |
bind_device_to_gateway
bind_device_to_gateway(parent, gateway_id, device_id, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Associates the device with the gateway.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
parent = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]')
TODO: Initialize
gateway_id
:gateway_id = ''
TODO: Initialize
device_id
:device_id = ''
response = client.bind_device_to_gateway(parent, gateway_id, device_id)
Name | Description |
parent |
str
Required. The name of the registry. For example, |
gateway_id |
str
Required. The value of |
device_id |
str
Required. The device to associate with the specified gateway. The value of |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
create_device
create_device(parent, device, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Creates a device in a device registry.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
parent = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]')
TODO: Initialize
device
:device = {}
response = client.create_device(parent, device)
Name | Description |
parent |
str
Required. The name of the device registry where this device should be created. For example, |
device |
Union[dict, Device]
Required. The device registration details. The field |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
create_device_registry
create_device_registry(parent, device_registry, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Creates a device registry that contains devices.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
parent = client.location_path('[PROJECT]', '[LOCATION]')
TODO: Initialize
device_registry
:device_registry = {}
response = client.create_device_registry(parent, device_registry)
Name | Description |
parent |
str
Required. The project and cloud region where this device registry must be created. For example, |
device_registry |
Union[dict, DeviceRegistry]
Required. The device registry. The field |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
delete_device
delete_device(name, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Deletes a device.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.device_path('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]')
client.delete_device(name)
Name | Description |
name |
str
Required. The name of the device. For example, |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
delete_device_registry
delete_device_registry(name, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Deletes a device registry configuration.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]')
client.delete_device_registry(name)
Name | Description |
name |
str
Required. The name of the device registry. For example, |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
device_path
device_path(project, location, registry, device)
Return a fully-qualified device string.
from_service_account_file
from_service_account_file(filename, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
DeviceManagerClient | The constructed client. |
from_service_account_json
from_service_account_json(filename, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
DeviceManagerClient | The constructed client. |
get_device
get_device(name, field_mask=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Gets details about a device.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.device_path('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]')
response = client.get_device(name)
Name | Description |
name |
str
Required. The name of the device. For example, |
field_mask |
Union[dict, FieldMask]
The fields of the |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
get_device_registry
get_device_registry(name, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Gets a device registry configuration.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]')
response = client.get_device_registry(name)
Name | Description |
name |
str
Required. The name of the device registry. For example, |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
get_iam_policy
get_iam_policy(resource, options_=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
TODO: Initialize
resource
:resource = ''
response = client.get_iam_policy(resource)
Name | Description |
resource |
str
REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
options_ |
Union[dict, GetPolicyOptions]
OPTIONAL: A |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
list_device_config_versions
list_device_config_versions(name, num_versions=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.device_path('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]')
response = client.list_device_config_versions(name)
Name | Description |
name |
str
Required. The name of the device. For example, |
num_versions |
int
The number of versions to list. Versions are listed in decreasing order of the version number. The maximum number of versions retained is 10. If this value is zero, it will return all the versions available. |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
list_device_registries
list_device_registries(parent, page_size=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Lists device registries.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
parent = client.location_path('[PROJECT]', '[LOCATION]')
Iterate over all results
for element in client.list_device_registries(parent): ... # process element ... pass
Alternatively:
Iterate over results one page at a time
for page in client.list_device_registries(parent).pages: ... for element in page: ... # process element ... pass
Name | Description |
parent |
str
Required. The project and cloud region path. For example, |
page_size |
int
The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page. |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
list_device_states
list_device_states(name, num_states=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Lists the last few versions of the device state in descending order (i.e.: newest first).
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.device_path('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]')
response = client.list_device_states(name)
Name | Description |
name |
str
Required. The name of the device. For example, |
num_states |
int
The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available. |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
list_devices
list_devices(parent, device_num_ids=None, device_ids=None, field_mask=None, gateway_list_options=None, page_size=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
List devices in a device registry.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
parent = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]')
Iterate over all results
for element in client.list_devices(parent): ... # process element ... pass
Alternatively:
Iterate over results one page at a time
for page in client.list_devices(parent).pages: ... for element in page: ... # process element ... pass
Name | Description |
parent |
str
Required. The device registry path. Required. For example, |
device_num_ids |
list[long]
A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000. |
device_ids |
list[str]
A list of device string IDs. For example, |
field_mask |
Union[dict, FieldMask]
The fields of the |
gateway_list_options |
Union[dict, GatewayListOptions]
Options related to gateways. If a dict is provided, it must be of the same form as the protobuf message GatewayListOptions |
page_size |
int
The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page. |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
location_path
location_path(project, location)
Return a fully-qualified location string.
modify_cloud_to_device_config
modify_cloud_to_device_config(name, binary_data, version_to_update=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.device_path('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]')
TODO: Initialize
binary_data
:binary_data = b''
response = client.modify_cloud_to_device_config(name, binary_data)
Name | Description |
name |
str
Required. The name of the device. For example, |
binary_data |
bytes
Required. The configuration data for the device. |
version_to_update |
long
The version number to update. If this value is zero, it will not check the version number of the server and will always update the current version; otherwise, this update will fail if the version number found on the server does not match this version number. This is used to support multiple simultaneous updates without losing data. |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
registry_path
registry_path(project, location, registry)
Return a fully-qualified registry string.
send_command_to_device
send_command_to_device(name, binary_data, subfolder=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
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.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
name = client.device_path('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]')
TODO: Initialize
binary_data
:binary_data = b''
response = client.send_command_to_device(name, binary_data)
Name | Description |
name |
str
Required. The name of the device. For example, |
binary_data |
bytes
Required. The command data to send to the device. |
subfolder |
str
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. |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
set_iam_policy
set_iam_policy(resource, policy, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Sets the access control policy on the specified resource. Replaces any existing policy.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
TODO: Initialize
resource
:resource = ''
TODO: Initialize
policy
:policy = {}
response = client.set_iam_policy(resource, policy)
Name | Description |
resource |
str
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy |
Union[dict, Policy]
REQUIRED: The complete policy to be applied to the |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
test_iam_permissions
test_iam_permissions(resource, permissions, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
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.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
TODO: Initialize
resource
:resource = ''
TODO: Initialize
permissions
:permissions = []
response = client.test_iam_permissions(resource, permissions)
Name | Description |
resource |
str
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions |
list[str]
The set of permissions to check for the |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
unbind_device_from_gateway
unbind_device_from_gateway(parent, gateway_id, device_id, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Deletes the association between the device and the gateway.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
parent = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]')
TODO: Initialize
gateway_id
:gateway_id = ''
TODO: Initialize
device_id
:device_id = ''
response = client.unbind_device_from_gateway(parent, gateway_id, device_id)
Name | Description |
parent |
str
Required. The name of the registry. For example, |
gateway_id |
str
Required. The value of |
device_id |
str
Required. The device to disassociate from the specified gateway. The value of |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
update_device
update_device(device, update_mask, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Updates a device.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
TODO: Initialize
device
:device = {}
TODO: Initialize
update_mask
:update_mask = {}
response = client.update_device(device, update_mask)
Name | Description |
device |
Union[dict, Device]
Required. The new values for the device. The |
update_mask |
Union[dict, FieldMask]
Required. Only updates the |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |
update_device_registry
update_device_registry(device_registry, update_mask, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)
Updates a device registry configuration.
.. rubric:: Example
from google.cloud import iot_v1
client = iot_v1.DeviceManagerClient()
TODO: Initialize
device_registry
:device_registry = {}
TODO: Initialize
update_mask
:update_mask = {}
response = client.update_device_registry(device_registry, update_mask)
Name | Description |
device_registry |
Union[dict, DeviceRegistry]
Required. The new values for the device registry. The |
update_mask |
Union[dict, FieldMask]
Required. Only updates the |
retry |
Optional[google.api_core.retry.Retry]
A retry object used to retry requests. If |
timeout |
Optional[float]
The amount of time, in seconds, to wait for the request to complete. Note that if |
metadata |
Optional[Sequence[Tuple[str, str]]]
Additional metadata that is provided to the method. |
Type | Description |
google.api_core.exceptions.GoogleAPICallError | If the request failed for any reason. |
google.api_core.exceptions.RetryError | If the request failed due to a retryable error and retry attempts failed. |
ValueError | If the parameters are invalid. |