DeviceTwin.replaceTwin(DeviceTwinDevice device) 方法

定义

Replace the full device twin for a given device with the provided device twin.

public DeviceTwinDevice replaceTwin(DeviceTwinDevice device)

参数

device
DeviceTwinDevice

The device twin object to replace the current device twin object.

返回

The Twin object's current state returned from the service after the replace operation.

例外

IotHubException

If any an IoT hub level exception is thrown. For instance, if the request is unauthorized, a exception that extends IotHubException will be thrown.

IOException

If the request failed to send to IoT hub.

适用于