From 683280e62e2b89340f0ab9a544d231ce5fdeddba Mon Sep 17 00:00:00 2001 From: Dragos Avadanei Date: Mon, 23 Apr 2018 18:58:19 -0700 Subject: [PATCH] updating breaking changes to reflect changes in the Set-SAS definition cmdlet --- .../upcoming-breaking-changes.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/ResourceManager/KeyVault/documentation/upcoming-breaking-changes.md b/src/ResourceManager/KeyVault/documentation/upcoming-breaking-changes.md index 09588f706419..dd241133926b 100644 --- a/src/ResourceManager/KeyVault/documentation/upcoming-breaking-changes.md +++ b/src/ResourceManager/KeyVault/documentation/upcoming-breaking-changes.md @@ -27,6 +27,34 @@ # Upcoming Breaking Changes +## Release 4.4.0 + + The following cmdlets were affected this release: + + **Set-AzureKeyVaultManagedStorageSasDefinition** + - The cmdlet no longer accepts individual parameters that compose the access token; instead, the cmdlet replaces explicit token parameters such as Service or Permissions with a generic 'TemplateUri' parameter, corresponding to a sample access token defined elsewhere (presumably using Storage PowerShell cmdlets, or composed manually according to the Storage documentation.) The cmdlet retains the 'ValidityPeriod' parameter. + + For more information on composing shared access tokens for Azure Storage, please refer to the documentation pages, respectively: + - [Constructing a Service SAS] (https://docs.microsoft.com/en-us/rest/api/storageservices/Constructing-a-Service-SAS) + - [Constructing an Account SAS] (https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas) + + ```powershell + # Old + + $sas = Set-AzureKeyVaultManagedStorageSasDefinition -VaultName myVault -Name myKey -Service Blob -Permissions 'rcw' -ValidityPeriod 180d + + + # New + + $sctx=New-AzureStorageContext -StorageAccountName $sa.StorageAccountName -Protocol Https -StorageAccountKey Key1 + $start=[System.DateTime]::Now.AddDays(-1) + $end=[System.DateTime]::Now.AddMonths(1) + $at=New-AzureStorageAccountSasToken -Service blob -ResourceType Service,Container,Object -Permission "racwdlup" -Protocol HttpsOnly -StartTime $start -ExpiryTime $end -Context $sctx + $sas=Set-AzureKeyVaultManagedStorageSasDefinition -AccountName $sa.StorageAccountName -VaultName $kv.VaultName -Name accountsas -TemplateUri $at -SasType 'account' -ValidityPeriod ([System.Timespan]::FromDays(30)) + + ``` + + ## Release 3.0.0 The following cmdlets were affected this release: