다음을 통해 공유


Twin Class

Definition

Twin Representation

[Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Devices.Shared.TwinJsonConverter))]
public class Twin : Microsoft.Azure.Devices.Shared.IETagHolder
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Devices.Shared.TwinJsonConverter))>]
type Twin = class
    interface IETagHolder
Public Class Twin
Implements IETagHolder
Inheritance
Twin
Attributes
Newtonsoft.Json.JsonConverterAttribute
Implements

Constructors

Twin()

Creates an instance of Twin

Twin(String)

Creates an instance of Twin

Twin(TwinProperties)

Creates an instance of Twin

Properties

AuthenticationType

Corresponding Device's authentication type

Capabilities

Gets the Twin capabilities. These are read only.

CloudToDeviceMessageCount

Number of messages sent to the corresponding Device from the Cloud

Configurations

Gets the Twin configuration properties. These are read only

ConnectionState

Corresponding Device's ConnectionState

DeviceId

Gets and sets the Twin Id.

DeviceScope

The scope of the device. Auto-generated and immutable for edge devices and modifiable in leaf devices to create child/parent relationship.

ETag

Twin's ETag

LastActivityTime

Time when the corresponding Device was last active

ModelId

The DTDL model Id of the device.

ModuleId

Gets and sets the Twin Module Id.

ParentScopes

The scopes of the upper level edge devices if applicable. Only available for edge devices.

Properties

Gets and sets the Twin properties.

Status

Gets the corresponding Device's Status.

StatusReason

Reason, if any, for the corresponding Device to be in specified Status

StatusUpdatedTime

Time when the corresponding Device's Status was last updated

Tags

Gets and sets the Twin tags.

Version

Twin's Version

X509Thumbprint

Corresponding Device's X509 thumbprint

Methods

ToJson(Formatting)

Gets the Twin as a JSON string

Applies to