IoTHubDigitalTwinManager Class
A class to provide convenience APIs for IoTHub DigitalTwin Manager operations, based on top of the auto generated IotHub REST APIs
- Inheritance
-
builtins.objectIoTHubDigitalTwinManager
Constructor
IoTHubDigitalTwinManager(connection_string)
Parameters
- connection_string
Methods
| get_digital_twin |
Retrieve the Digital Twin of a given device. :param str digital_twin__id: The digital twin Id of the given device. |
| invoke_command |
Invoke a command on a particular device and get the result of it. :param str digital_twin__id: The digital twin Id of the given device. :param str command_name: The command's name. :param str payload: The argument of a command. :param int connect_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the answer. :param int response_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the response. The value must be within 5-300. |
| invoke_component_command |
Invoke a command on an component of a particular device and get the result of it. :param str digital_twin__id: The digital twin Id of the given device. :param str component_path: The component's name. :param str command_name: The command's name. :param str payload: The argument of a command. :param int connect_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the answer. :param int response_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the response. The value must be within 5-300. :type response_timeout_in_seconds: int |
| update_digital_twin |
Update the Digital Twin Component of a given device using a patch object. :param str digital_twin__id: The digital twin Id of the given device. :param list[object]: The json-patch object to update the Digital Twin. :param str etag: The etag (if_match) value to use for the update operation. |
get_digital_twin
Retrieve the Digital Twin of a given device. :param str digital_twin__id: The digital twin Id of the given device.
get_digital_twin(digital_twin_id)
Parameters
- digital_twin_id
Returns
The return object containing the Digital Twin.
Exceptions
invoke_command
Invoke a command on a particular device and get the result of it. :param str digital_twin__id: The digital twin Id of the given device. :param str command_name: The command's name. :param str payload: The argument of a command. :param int connect_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the answer. :param int response_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the response. The value must be within 5-300.
invoke_command(digital_twin_id, command_name, payload, connect_timeout_in_seconds=None, response_timeout_in_seconds=None)
Parameters
- digital_twin_id
- command_name
- payload
- connect_timeout_in_seconds
- response_timeout_in_seconds
Returns
The result of the invoked command.
Exceptions
invoke_component_command
Invoke a command on an component of a particular device and get the result of it. :param str digital_twin__id: The digital twin Id of the given device. :param str component_path: The component's name. :param str command_name: The command's name. :param str payload: The argument of a command. :param int connect_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the answer. :param int response_timeout_in_seconds: Maximum interval of time, in seconds, that the digital twin command will wait for the response. The value must be within 5-300. :type response_timeout_in_seconds: int
invoke_component_command(digital_twin_id, component_path, command_name, payload, connect_timeout_in_seconds=None, response_timeout_in_seconds=None)
Parameters
- digital_twin_id
- component_path
- command_name
- payload
- connect_timeout_in_seconds
- response_timeout_in_seconds
Returns
The result of the invoked command.
Exceptions
update_digital_twin
Update the Digital Twin Component of a given device using a patch object. :param str digital_twin__id: The digital twin Id of the given device. :param list[object]: The json-patch object to update the Digital Twin. :param str etag: The etag (if_match) value to use for the update operation.
update_digital_twin(digital_twin_id, digital_twin_patch, etag=None)
Parameters
- digital_twin_id
- digital_twin_patch
- etag
Returns
The return object containing the updated Digital Twin.
Exceptions
Feedback
Submit and view feedback for