/** * Updates the virtual machine's OS Disk model with the encryption specific details so that platform can * use it while booting the virtual machine. * * @param encryptConfig the configuration specific to enabling the encryption * @param encryptionSecretKeyVaultUrl the keyVault URL pointing to secret holding disk encryption key * @return an observable that emits updated virtual machine */ private Observable<VirtualMachine> updateVMStorageProfileAsync(final EnableDisableEncryptConfig encryptConfig, final String encryptionSecretKeyVaultUrl) { DiskEncryptionSettings diskEncryptionSettings = encryptConfig.storageProfileEncryptionSettings(); diskEncryptionSettings.diskEncryptionKey() .withSecretUrl(encryptionSecretKeyVaultUrl); return virtualMachine.update() .withOSDiskEncryptionSettings(diskEncryptionSettings) .applyAsync(); }
/** * Updates the virtual machine's OS Disk model with the encryption specific details so that platform can * use it while booting the virtual machine. * * @param encryptConfig the configuration specific to enabling the encryption * @param encryptionSecretKeyVaultUrl the keyVault URL pointing to secret holding disk encryption key * @return an observable that emits updated virtual machine */ private Observable<VirtualMachine> updateVMStorageProfileAsync(final EnableDisableEncryptConfig encryptConfig, final String encryptionSecretKeyVaultUrl) { DiskEncryptionSettings diskEncryptionSettings = encryptConfig.storageProfileEncryptionSettings(); diskEncryptionSettings.diskEncryptionKey() .withSecretUrl(encryptionSecretKeyVaultUrl); return virtualMachine.update() .withOSDiskEncryptionSettings(diskEncryptionSettings) .applyAsync(); }
/** * Updates the virtual machine's OS Disk model with the encryption specific details. * * @param encryptConfig the configuration specific to disabling the encryption * @return an observable that emits updated virtual machine */ private Observable<VirtualMachine> updateVMStorageProfileAsync(final EnableDisableEncryptConfig encryptConfig) { DiskEncryptionSettings diskEncryptionSettings = encryptConfig.storageProfileEncryptionSettings(); return virtualMachine.update() .withOSDiskEncryptionSettings(diskEncryptionSettings) .applyAsync(); }
/** * Updates the virtual machine's OS Disk model with the encryption specific details. * * @param encryptConfig the configuration specific to disabling the encryption * @return an observable that emits updated virtual machine */ private Observable<VirtualMachine> updateVMStorageProfileAsync(final EnableDisableEncryptConfig encryptConfig) { DiskEncryptionSettings diskEncryptionSettings = encryptConfig.storageProfileEncryptionSettings(); return virtualMachine.update() .withOSDiskEncryptionSettings(diskEncryptionSettings) .applyAsync(); }