/// <summary> /// Returns private configuration as string /// </summary> /// <returns></returns> private SqlServerPrivateSettings GetPrivateConfiguration() { PrivateKeyVaultCredentialSettings akvPrivateSettings = null; if (this.KeyVaultCredentialSettings != null) { akvPrivateSettings = new PrivateKeyVaultCredentialSettings { AzureKeyVaultUrl = this.KeyVaultCredentialSettings.AzureKeyVaultUrl, ServicePrincipalName = this.KeyVaultCredentialSettings.ServicePrincipalName, ServicePrincipalSecret = this.KeyVaultCredentialSettings.ServicePrincipalSecret }; } return(new SqlServerPrivateSettings { StorageUrl = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.StorageUrl, StorageAccessKey = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.StorageAccessKey, Password = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.Password, PrivateKeyVaultCredentialSettings = (akvPrivateSettings == null) ? null : akvPrivateSettings }); }
/// <summary> /// Returns private configuration as string /// </summary> /// <returns></returns> private SqlServerPrivateSettings GetPrivateConfiguration() { PrivateKeyVaultCredentialSettings akvPrivateSettings = null; if (this.KeyVaultCredentialSettings != null) { akvPrivateSettings = new PrivateKeyVaultCredentialSettings { AzureKeyVaultUrl = this.KeyVaultCredentialSettings.AzureKeyVaultUrl, ServicePrincipalName = this.KeyVaultCredentialSettings.ServicePrincipalName, ServicePrincipalSecret = this.KeyVaultCredentialSettings.ServicePrincipalSecret }; } return new SqlServerPrivateSettings { StorageUrl = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.StorageUrl, StorageAccessKey = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.StorageAccessKey, Password = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.Password, PrivateKeyVaultCredentialSettings = (akvPrivateSettings == null) ? null : akvPrivateSettings }; }