Partilhar via


ReprovisionPolicy Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.provisioning.service.configs.ReprovisionPolicy

public class ReprovisionPolicy

Settings for IoT Hub Device Reprovisioning

Constructor Summary

Constructor Description
ReprovisionPolicy()

Method Summary

Modifier and Type Method and Description
boolean getMigrateDeviceData()

Getter for the migrateDeviceData flag.

boolean getUpdateHubAssignment()

Getter for the updateHubAssignment flag.

void setMigrateDeviceData(boolean migrateDeviceData)

When set to true (default), the Device Provisioning Service will migrate the device's data (twin, device capabilities, and device ID) from one IoT hub to another during an IoT hub assignment update.

void setUpdateHubAssignment(boolean updateHubAssignment)

When set to true (default), the Device Provisioning Service will evaluate the device's IoT Hub assignment and update it if necessary for any provisioning requests beyond the first from a given device.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

ReprovisionPolicy

public ReprovisionPolicy()

Method Details

getMigrateDeviceData

public boolean getMigrateDeviceData()

Getter for the migrateDeviceData flag.

Returns:

The boolean with the migrateDeviceData content.

getUpdateHubAssignment

public boolean getUpdateHubAssignment()

Getter for the updateHubAssignment flag.

Returns:

The boolean with the updateHubAssignment content.

setMigrateDeviceData

public void setMigrateDeviceData(boolean migrateDeviceData)

When set to true (default), the Device Provisioning Service will migrate the device's data (twin, device capabilities, and device ID) from one IoT hub to another during an IoT hub assignment update. If set to false, the Device Provisioning Service will reset the device's data to the initial desired configuration stored in the provisioning service's enrollment list.

Parameters:

migrateDeviceData - the boolean with the flag for migrateDeviceData.

setUpdateHubAssignment

public void setUpdateHubAssignment(boolean updateHubAssignment)

When set to true (default), the Device Provisioning Service will evaluate the device's IoT Hub assignment and update it if necessary for any provisioning requests beyond the first from a given device. If set to false, the device will stay assigned to its current IoT hub.

Parameters:

updateHubAssignment - the boolean with the flag for updateHubAssignment.

Applies to