Sets a Shared Access Signature (SAS) definition with a given Key Vault managed Azure Storage
Account. This also sets a secret which can be used to get the SAS token per this SAS definition.
SAS token is generated using these parameters and the active key of the Key Vault managed Azure
Storage Account.
Examples
Example 1: Set an account-type SAS definition, and obtain a current SAS token based on it
Sets an account SAS definition 'accountsas' on a KeyVault-managed storage account 'mysa' in vault 'mykv'. Specifically, the sequence above performs the following:
gets a (pre-existing) storage account
gets a (pre-existing) key vault
adds a KeyVault-managed storage account to the vault, setting Key1 as the active key, and with a regeneration period of 180 days
sets a storage context for the specified storage account, with Key1
creates an account SAS token for services Blob, File, Table and Queue, for resource types Service, Container and Object, with all permissions, over https and with the specified start and end dates
sets a KeyVault-managed storage SAS definition in the vault, with the template uri as the SAS token created above, of SAS type 'account' and valid for 30 days
retrieves the actual access token from the KeyVault secret corresponding to the SAS definition
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.
Storage sas definition name. Cmdlet constructs the FQDN of a storage sas definition from vault
name, currently selected environment, storage account name and sas definition name.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.