Update-AzKeyVaultManagedStorageAccount
Update editable attributes of a Key Vault managed Azure Storage Account.
Syntax
ByDefinitionName (Default)
Update-AzKeyVaultManagedStorageAccount
[-VaultName] <String>
[-AccountName] <String>
[-ActiveKeyName <String>]
[-AutoRegenerateKey <Boolean>]
[-RegenerationPeriod <TimeSpan>]
[-Enable <Boolean>]
[-Tag <Hashtable>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzKeyVaultManagedStorageAccount
[-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>
[-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.
Update-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -ActiveKeyName 'key2'
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 : key2
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 :
Updates the Key Vault managed Azure Storage Account active key to 'key2'. 'key2' will be used to
generate SAS tokens after this update.
Example 2
Update editable attributes of a Key Vault managed Azure Storage Account. (autogenerated)
Update-AzKeyVaultManagedStorageAccount -AccountName 'mystorageaccount' -AutoRegenerateKey $false -RegenerationPeriod $regenerationPeriod -VaultName 'myvault'
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.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: StorageAccountName, Name
Parameter sets
ByDefinitionName
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ActiveKeyName
Active key name.
If not specified, the existing value of managed storage account's active key name remains unchanged
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AutoRegenerateKey
Auto regenerate key.
If not specified, the existing value of auto regenerate key of managed storage account remains unchanged
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: 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.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ManagedStorageAccount object.
ByInputObject
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-PassThru
Cmdlet does not return object by default. If this switch is specified, return managed storage
account object.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: 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
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
Key-value pairs in the form of a hash table. For example:
@{key0="value0";key1=$null;key2="value2"}
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Tags
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VaultName
Vault name.
Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByDefinitionName
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs