Update-AzKeyVaultManagedStorageAccountKey
Regenerates the specified key of Key Vault managed Azure Storage Account.
Syntax
Update-AzKeyVaultManagedStorageAccountKey
[-VaultName] <String>
[-AccountName] <String>
[-KeyName] <String>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzKeyVaultManagedStorageAccountKey
[-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>
[-KeyName] <String>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Regenerates the specified key of Key Vault managed Azure Storage Account and sets the key as the active key. Key Vault proxies the call to Azure Resource Manager to regenerate the key. The caller must posses permissions to regenerate keys on given Azure Storage Account.
Examples
Example 1: Regenerate a key
Update-AzKeyVaultManagedStorageAccountKey -VaultName 'myvault' -AccountName 'mystorageaccount' -KeyName 'key1'
Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Active Key Name : key1
Auto Regenerate Key : True
Regeneration Period : 90.00:00:00
Enabled : True
Created : 5/21/2018 11:55:58 PM
Updated : 5/21/2018 11:55:58 PM
Tags :
Regenerates 'key1' of account 'mystorageaccount' and sets 'key1' as the active of the Key Vault managed Azure Storage Account.
Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from vault name, currently selected environment and manged storage account name.
Type: | String |
Aliases: | StorageAccountName, Name |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Do not ask for confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
ManagedStorageAccount object.
Type: | PSKeyVaultManagedStorageAccountIdentityItem |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-KeyName
Name of storage account key to regenerate and make active.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Cmdlet does not return an object by default. If this switch is specified, cmdlet returns the managed storage account that was deleted.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
PSKeyVaultManagedStorageAccountIdentityItem
Outputs
PSKeyVaultManagedStorageAccount
Related Links
Azure PowerShell