Twin Class
The state information for a device or module. This is implicitly created and deleted when the corresponding device/ module identity is created or deleted in the IoT Hub.
- Inheritance
-
Twin
Constructor
Twin(**kwargs)
Parameters
- device_id
- str
The unique identifier of the device in the identity registry of the IoT Hub. It is a case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars, and the following special characters {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.
- module_id
- str
The unique identifier of the module in the identity registry of the IoT Hub. It is a case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars, and the following special characters {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.
The collection of key-value pairs read and written by the solution back end. They are not visible to device apps. They keys are UTF-8 encoded, case-sensitive and up-to 1KB in length. Allowed characters exclude UNICODE control characters (segments C0 and C1), '.', '$' and space. The values are JSON objects, up-to 4KB in length.
- version
- <xref:long>
The version for the device twin including tags and desired properties
- status
- str or <xref:protocol.models.enum>
The enabled status of the device. If disabled, the device cannot connect to the service. Possible values include: 'enabled', 'disabled'
- status_update_time
- datetime
The date and time when the status of the device was last updated.
- connection_state
- str or <xref:protocol.models.enum>
The connection state of the device. Possible values include: 'Disconnected', 'Connected'
- last_activity_time
- datetime
The date and time when the device last connected or received or sent a message. The date and time is sepecified in ISO8601 datetime format in UTC, for example, 2015-01-28T16:24:48.789Z. This value is not updated if the device uses the HTTP/1 protocol to perform messaging operations.
- authentication_type
- str or <xref:protocol.models.enum>
The authentication type used by the device. Possible values include: 'sas', 'selfSigned', 'certificateAuthority', 'none'
- capabilities
- DeviceCapabilities
Feedback
Submit and view feedback for