編輯

共用方式為


Update-AzKeyVaultManagedStorageAccount

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

Syntax

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.

Type:String
Aliases:StorageAccountName, Name
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-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
Required:False
Accept pipeline input:False
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:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
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

-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:Nullable<T>[Boolean]
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

-PassThru

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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:Nullable<T>[TimeSpan]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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
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