DigitalTwinOperations Class

DigitalTwinOperations operations.

Inheritance
builtins.object
DigitalTwinOperations

Constructor

DigitalTwinOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

api_version

Version of the Api. Constant value: "2021-04-12".

Methods

get_digital_twin

Gets a digital twin.

invoke_component_command

Invoke a digital twin command.

Invoke a digital twin command.

invoke_root_level_command

Invoke a digital twin root level command.

Invoke a digital twin root level command.

update_digital_twin

Updates a digital twin.

get_digital_twin

Gets a digital twin.

get_digital_twin(id, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

Digital Twin ID.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

object or ClientRawResponse if raw=true

Return type

Exceptions

invoke_component_command

Invoke a digital twin command.

Invoke a digital twin command.

invoke_component_command(id, component_path, command_name, payload, connect_timeout_in_seconds=None, response_timeout_in_seconds=None, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required
component_path
str
Required
command_name
str
Required
payload
object
Required
connect_timeout_in_seconds
int
default value: None

Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

response_timeout_in_seconds
int
default value: None

Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

object or ClientRawResponse if raw=true

Return type

Exceptions

invoke_root_level_command

Invoke a digital twin root level command.

Invoke a digital twin root level command.

invoke_root_level_command(id, command_name, payload, connect_timeout_in_seconds=None, response_timeout_in_seconds=None, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required
command_name
str
Required
payload
object
Required
connect_timeout_in_seconds
int
default value: None

Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

response_timeout_in_seconds
int
default value: None

Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

object or ClientRawResponse if raw=true

Return type

Exceptions

update_digital_twin

Updates a digital twin.

update_digital_twin(id, digital_twin_patch, if_match=None, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

Digital Twin ID.

digital_twin_patch
list[object]
Required

json-patch contents to update.

if_match
str
default value: None
custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

Attributes

models

models = <module 'azure.iot.hub.protocol.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\iot\\hub\\protocol\\models\\__init__.py'>