azext_iot/operations/dps.py [299:328]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if reprovision_policy:
            enrollment_record.reprovision_policy = _get_reprovision_policy(
                reprovision_policy
            )
        enrollment_record.initial_twin = _get_updated_inital_twin(
            enrollment_record, initial_twin_tags, initial_twin_properties
        )
        iot_hub_list = iot_hubs.split() if isinstance(iot_hubs, str) else iot_hubs
        _validate_allocation_policy_for_enrollment(
            allocation_policy,
            iot_hub_host_name,
            iot_hub_list,
            webhook_url,
            api_version,
            current_enrollment=enrollment_record
        )
        if iot_hub_list:
            enrollment_record.iot_hubs = iot_hub_list
            enrollment_record.iot_hub_host_name = None
        if allocation_policy:
            enrollment_record.allocation_policy = allocation_policy
        if enrollment_record.allocation_policy == AllocationType.custom.value and any([
            webhook_url, api_version
        ]):
            enrollment_record.custom_allocation_definition = CustomAllocationDefinition(
                webhook_url=webhook_url or enrollment_record.custom_allocation_definition.webhook_url,
                api_version=api_version or enrollment_record.custom_allocation_definition.api_version
            )
        if edge_enabled is not None:
            enrollment_record.capabilities = DeviceCapabilities(iot_edge=edge_enabled)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



azext_iot/operations/dps.py [626:655]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if reprovision_policy:
            enrollment_record.reprovision_policy = _get_reprovision_policy(
                reprovision_policy
            )
        enrollment_record.initial_twin = _get_updated_inital_twin(
            enrollment_record, initial_twin_tags, initial_twin_properties
        )
        iot_hub_list = iot_hubs.split() if isinstance(iot_hubs, str) else iot_hubs
        _validate_allocation_policy_for_enrollment(
            allocation_policy,
            iot_hub_host_name,
            iot_hub_list,
            webhook_url,
            api_version,
            current_enrollment=enrollment_record
        )
        if iot_hub_list:
            enrollment_record.iot_hubs = iot_hub_list
            enrollment_record.iot_hub_host_name = None
        if allocation_policy:
            enrollment_record.allocation_policy = allocation_policy
        if enrollment_record.allocation_policy == AllocationType.custom.value and any([
            webhook_url, api_version
        ]):
            enrollment_record.custom_allocation_definition = CustomAllocationDefinition(
                webhook_url=webhook_url or enrollment_record.custom_allocation_definition.webhook_url,
                api_version=api_version or enrollment_record.custom_allocation_definition.api_version
            )
        if edge_enabled is not None:
            enrollment_record.capabilities = DeviceCapabilities(iot_edge=edge_enabled)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



