Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyVault] Redesign HSM cmdlets #13599

Merged
merged 7 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
resource string
  • Loading branch information
isra-fel committed Dec 1, 2020
commit 71f58b78db44a28454dfc70f5368c08c40611abf
5 changes: 3 additions & 2 deletions src/KeyVault/KeyVault/Commands/UpdateAzureManagedHsm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Azure.Commands.KeyVault.Models;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
Expand Down Expand Up @@ -68,10 +69,10 @@ public override void ExecuteCmdlet()

if (existingResource == null)
{
throw new Exception(string.Format("A managed HSM with name '{0}' in resource group '{1}' does not exist. Please use New-AzKeyVaultManagedHsm to create a managed HSM with these properties.", this.Name, this.ResourceGroupName));
throw new Exception(string.Format(Resources.HsmNotFound, this.Name, this.ResourceGroupName));
}

if (this.ShouldProcess(this.Name, string.Format("Updating managed HSM '{0}' in resource group '{1}'.", this.Name, this.ResourceGroupName)))
if (this.ShouldProcess(this.Name, string.Format(Resources.UpdateHsmShouldProcessMessage, this.Name, this.ResourceGroupName)))
{
var result = KeyVaultManagementClient.UpdateManagedHsm(existingResource,
new VaultCreationOrUpdateParameters
Expand Down
Loading