/
azure.iot.hub.DigitalTwinClient.yml
198 lines (164 loc) · 6.51 KB
/
azure.iot.hub.DigitalTwinClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
### YamlMime:PythonClass
uid: azure.iot.hub.DigitalTwinClient
name: DigitalTwinClient
fullName: azure.iot.hub.DigitalTwinClient
module: azure.iot.hub
inheritances:
- builtins.object
summary: 'A class to provide convenience APIs for DigitalTwin operations,
based on top of the auto generated IotHub REST APIs
Initializer for a DigitalTwinClient.
After a successful creation the class has been authenticated with IoTHub and
it is ready to call the member APIs to communicate with IoTHub.'
constructor:
syntax: DigitalTwinClient(connection_string=None, host=None, auth=None)
parameters:
- name: connection_string
description: 'The IoTHub connection string used to authenticate connection
with IoTHub if we are using connection_str authentication. Default value: None'
defaultValue: None
types:
- <xref:str>
- name: host
description: 'The Azure service url if we are using token credential authentication.
Default value: None'
defaultValue: None
types:
- <xref:str>
- name: auth
description: 'The Azure authentication object if we are using token credential
authentication.
Default value: None'
defaultValue: None
types:
- <xref:str>
methods:
- uid: azure.iot.hub.DigitalTwinClient.from_connection_string
name: from_connection_string
summary: 'Classmethod initializer for a DigitalTwinClient Service client.
Creates DigitalTwinClient class from connection string.
After a successful creation the class has been authenticated with IoTHub and
it is ready to call the member APIs to communicate with IoTHub.'
signature: from_connection_string(connection_string)
parameters:
- name: connection_string
description: 'The IoTHub connection string used to authenticate connection
with IoTHub.'
isRequired: true
types:
- <xref:str>
return:
types:
- <xref:azure.iot.hub.DigitalTwinClient>
- uid: azure.iot.hub.DigitalTwinClient.from_token_credential
name: from_token_credential
summary: 'Classmethod initializer for a DigitalTwinClient Service client.
Creates DigitalTwinClient class from host name url and Azure token credential.
After a successful creation the class has been authenticated with IoTHub and
it is ready to call the member APIs to communicate with IoTHub.'
signature: from_token_credential(url, token_credential)
parameters:
- name: url
description: The Azure service url (host name).
isRequired: true
types:
- <xref:str>
- name: token_credential
description: The Azure token credential object
isRequired: true
types:
- <xref:azure.core.TokenCredential>
return:
types:
- <xref:azure.iot.hub.DigitalTwinClient>
- uid: azure.iot.hub.DigitalTwinClient.get_digital_twin
name: get_digital_twin
summary: 'Retrieve the Digital Twin of a given device.
:param str digital_twin__id: The digital twin Id of the given device.'
signature: get_digital_twin(digital_twin_id)
parameters:
- name: digital_twin_id
isRequired: true
return:
description: The return object containing the Digital Twin.
exceptions:
- type: <xref:if the HTTP response status is not in >[<xref:200>]<xref:.>
- uid: azure.iot.hub.DigitalTwinClient.invoke_command
name: invoke_command
summary: '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.'
signature: invoke_command(digital_twin_id, command_name, payload, connect_timeout_in_seconds=None,
response_timeout_in_seconds=None)
parameters:
- name: digital_twin_id
isRequired: true
- name: command_name
isRequired: true
- name: payload
isRequired: true
- name: connect_timeout_in_seconds
defaultValue: None
- name: response_timeout_in_seconds
defaultValue: None
return:
description: The result of the invoked command.
exceptions:
- type: <xref:if the HTTP response status is not in >[<xref:200>]<xref:.>
- uid: azure.iot.hub.DigitalTwinClient.invoke_component_command
name: invoke_component_command
summary: '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'
signature: invoke_component_command(digital_twin_id, component_path, command_name,
payload, connect_timeout_in_seconds=None, response_timeout_in_seconds=None)
parameters:
- name: digital_twin_id
isRequired: true
- name: component_path
isRequired: true
- name: command_name
isRequired: true
- name: payload
isRequired: true
- name: connect_timeout_in_seconds
defaultValue: None
- name: response_timeout_in_seconds
defaultValue: None
return:
description: The result of the invoked command.
exceptions:
- type: <xref:if the HTTP response status is not in >[<xref:200>]<xref:.>
- uid: azure.iot.hub.DigitalTwinClient.update_digital_twin
name: update_digital_twin
summary: '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.'
signature: update_digital_twin(digital_twin_id, digital_twin_patch, etag=None)
parameters:
- name: digital_twin_id
isRequired: true
- name: digital_twin_patch
isRequired: true
- name: etag
defaultValue: None
return:
description: The return object containing the updated Digital Twin.
exceptions:
- type: <xref:if the HTTP response status is not in >[<xref:200>]<xref:.>