Skip to content

Commit 454ddc7

Browse files
authored
[Storage] Add warning messages for SAS token question mark breaking change (#21957)
* Add warning msg for sas token question mark breaking change * modify phrasing of messages
1 parent 61f5e97 commit 454ddc7

File tree

10 files changed

+28
-0
lines changed

10 files changed

+28
-0
lines changed

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Add warning messages for an upcoming breaking change when creating SAS token
22+
- `New-AzStorageBlobSasToken`
23+
- `New-AzStorageContainerSasToken`
24+
- `New-AzStorageAccountSasToken`
25+
- `New-AzStorageContext`
26+
- `New-AzStorageFileSasToken`
27+
- `New-AzStorageShareSasToken`
28+
- `New-AzStorageQueueSasToken`
29+
- `New-AzStorageTableSasToken`
30+
- `New-AzDataLakeGen2SasToken`
2131
* Add a warning message for an upcoming breaking change when creating a storage account
2232
- `New-AzStorageAccount`
2333

src/Storage/Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
2828
using global::Azure.Storage.Blobs;
2929
using System.Collections.Generic;
3030
using global::Azure.Storage;
31+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
3132

33+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
3234
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageBlobSASToken", DefaultParameterSetName = BlobNamePipelineParmeterSetWithPermission, SupportsShouldProcess = true), OutputType(typeof(String))]
3335
public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase
3436
{

src/Storage/Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
2525
using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel;
2626
using Track2Models = global::Azure.Storage.Blobs.Models;
2727
using global::Azure.Storage.Sas;
28+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2829

30+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
2931
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageContainerSASToken", SupportsShouldProcess = true), OutputType(typeof(String))]
3032
public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBase
3133
{

src/Storage/Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
2121
using System.Security.Permissions;
2222
using global::Azure.Storage.Sas;
2323
using global::Azure.Storage;
24+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2425

26+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
2527
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageAccountSASToken"), OutputType(typeof(String))]
2628
public class NewAzureStorageAccountSasTokenCommand : StorageCloudBlobCmdletBase
2729
{

src/Storage/Storage/Common/Cmdlet/NewAzureStorageContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ public class NewAzureStorageContext : AzureDataCmdlet
150150
public string StorageAccountKey { get; set; }
151151

152152
private const string SasTokenHelpMessage = "Azure Storage SAS Token";
153+
[CmdletParameterBreakingChange("SasToken", ChangeDescription = "The SAS token in created Storage context properties " +
154+
"'ConnectionString' and 'StorageAccount.Credentials' won't have the leading question mark '?' in a future release.")]
153155
[Parameter(HelpMessage = SasTokenHelpMessage,
154156
Mandatory = true, ParameterSetName = SasTokenParameterSet)]
155157
[Parameter(HelpMessage = SasTokenHelpMessage,

src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
2222
using global::Azure.Storage.Files.DataLake;
2323
using global::Azure.Storage.Sas;
2424
using System;
25+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2526

2627
/// <summary>
2728
/// list azure blobs in specified azure FileSystem
2829
/// </summary>
30+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
2931
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "DataLakeGen2SasToken", DefaultParameterSetName = ManualParameterSet), OutputType(typeof(String))]
3032
public class NewDataLakeGen2SasTokenCommand : StorageCloudBlobCmdletBase
3133
{

src/Storage/Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
using Azure.Storage.Files.Shares.Models;
2626
using Azure.Storage.Sas;
2727
using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel;
28+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2829

2930
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
3031
{
32+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
3133
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageFileSASToken"), OutputType(typeof(String))]
3234
public class NewAzureStorageFileSasToken : AzureStorageFileCmdletBase
3335
{

src/Storage/Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
2626
using global::Azure.Storage.Files.Shares;
2727
using global::Azure.Storage.Sas;
2828
using global::Azure.Storage.Files.Shares.Models;
29+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2930

31+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
3032
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageShareSASToken"), OutputType(typeof(String))]
3133
public class NewAzureStorageShareSasToken : AzureStorageFileCmdletBase
3234
{

src/Storage/Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet
2121
using System;
2222
using System.Management.Automation;
2323
using System.Security.Permissions;
24+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2425

26+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
2527
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageQueueSASToken"), OutputType(typeof(String))]
2628
public class NewAzureStorageQueueSasTokenCommand : StorageQueueBaseCmdlet
2729
{

src/Storage/Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
2121
using System;
2222
using System.Management.Automation;
2323
using System.Security.Permissions;
24+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2425

26+
[GenericBreakingChange("The leading question mark '?' of the created SAS token will be removed in a future release.")]
2527
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageTableSASToken"), OutputType(typeof(String))]
2628
public class NewAzureStorageTableSasTokenCommand : StorageCloudTableCmdletBase
2729
{

0 commit comments

Comments
 (0)