Twin. replace Twin(DeviceTwinDevice device) 方法
Replace the full device twin for a given device with the provided device twin.
public DeviceTwinDevice replaceTwin(DeviceTwinDevice device)
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.
If any an IoT hub level exception is thrown. For instance, if the request is unauthorized, a exception that extends IotHubException will be thrown.
If the request failed to send to IoT hub.