Update-AzureKeyVaultManagedStorageAccount

Update editable attributes of a Key Vault managed Azure Storage Account.

Syntax

Update-AzureKeyVaultManagedStorageAccount
      [-VaultName] <String>
      [-AccountName] <String>
      [-ActiveKeyName <String>]
      [-AutoRegenerateKey <Boolean>]
      [-RegenerationPeriod <TimeSpan>]
      [-Enable <Boolean>]
      [-Tag <Hashtable>]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update the editable attributes of a Key Vault managed Azure Storage Account.

Examples

Example 1:Update the active key to 'key2' on a Key Vault managed Azure Storage Account.

PS C:\> Update-AzureKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -ActiveKeyName 'key2'

Updates the Key Vault managed Azure Storage Account active key to 'key2'. 'key2' will be used to generate SAS tokens after this update.

Required 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
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-ActiveKeyName

Active key name. If not specified, the existing value of managed storage account's active key name remains unchanged

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AutoRegenerateKey

Auto regenerate key. If not specified, the existing value of auto regenerate key of managed storage account remains unchanged

Type:System.Nullable`1[System.Boolean]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Enable

If present, enables a use of a managed storage account key for sas token generation if value is true. Disables use of a managed storage account key for sas token generation if value is false. If not specified, the existing value of the storage account's enabled/disabled state remains unchanged.

Type:System.Nullable`1[System.Boolean]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Cmdlet does not return object by default. If this switch is specified, return managed storage account object.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RegenerationPeriod

Regeneration period. If auto regenerate key is enabled, this value specifies the timespan after which managed storage account's inactive keygets auto regenerated and becomes the active key. If not specified, the existing value of regeneration period of keys of managed storage account remains unchanged

Type:System.Nullable`1[System.TimeSpan]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tag

Key-value pairs in the form of a hash table. For example:

@{key0="value0";key1=$null;key2="value2"}

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.KeyVault.Models.ManagedStorageAccount