/** * 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(); }
/** * 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(); }
@Override public Observable<VirtualMachine> call(final VirtualMachineExtension encryptionExtension) { final HashMap<String, Object> publicSettings = encryptConfig.extensionPublicSettings(); return virtualMachine.update() .updateExtension(encryptionExtension.name()) .withPublicSettings(publicSettings) .withProtectedSettings(encryptConfig.extensionProtectedSettings()) .parent() .applyAsync(); } });
@Override public Observable<VirtualMachine> call(final VirtualMachineExtension encryptionExtension) { final HashMap<String, Object> publicSettings = encryptConfig.extensionPublicSettings(); return virtualMachine.update() .updateExtension(encryptionExtension.name()) .withPublicSettings(publicSettings) .withProtectedSettings(encryptConfig.extensionProtectedSettings()) .parent() .applyAsync(); } });
@Override public Observable<VirtualMachine> call() { final String extensionName = encryptionExtensionType(); return virtualMachine.update() .defineNewExtension(extensionName) .withPublisher(encryptionExtensionPublisher) .withType(encryptionExtensionType()) .withVersion(encryptionExtensionVersion()) .withPublicSettings(encryptConfig.extensionPublicSettings()) .withProtectedSettings(encryptConfig.extensionProtectedSettings()) .withMinorVersionAutoUpgrade() .attach() .applyAsync(); } });
@Override public Observable<VirtualMachine> call() { final String extensionName = encryptionExtensionType(); return virtualMachine.update() .defineNewExtension(extensionName) .withPublisher(encryptionExtensionPublisher) .withType(encryptionExtensionType()) .withVersion(encryptionExtensionVersion()) .withPublicSettings(encryptConfig.extensionPublicSettings()) .withProtectedSettings(encryptConfig.extensionProtectedSettings()) .withMinorVersionAutoUpgrade() .attach() .applyAsync(); } });