Skip to content

Commit f1553ca

Browse files
authored
[Storage] Add warning messages for upcoming breaking changes (#24227)
* Add breaking change warning messages * update warning messages
1 parent 7feb66c commit f1553ca

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
## Upcoming Release
2121
* Fixed parser logic when downloading blob from managed disk account with Sas Uri and bearer token on Linux and MacOS
2222
- `Get-AzStorageBlobContent`
23+
* Added warning messages for upcoming breaking changes in Queue cmdlets for removing references to "Microsoft.Azure.Storage.Queue"
24+
- `New-AzStorageQueue`
25+
- `Get-AzStorageQueue`
26+
- `New-AzStorageQueueSASToken`
27+
* Added warning messages for an upcoming breaking change when uploading a file using SAS token without read permission
28+
- `Set-AzStorageFileContent`
29+
* Added warning messages for an upcoming breaking change when upgrading a Storage account to StorageV2
30+
- `Set-AzStorageAccount`
2331

2432
## Version 6.1.1
2533
* Removed some code branches referencing Microsoft.Azure.Storage.Blob

src/Storage/Storage.Management/StorageAccount/SetAzureStorageAccount.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ public PSNetworkRuleSet NetworkRuleSet
219219
get; set;
220220
}
221221

222+
[CmdletParameterBreakingChangeWithVersion("UpgradeToStorageV2", "12.0.0", "7.0.0", ChangeDescription = "A prompt that needs users' confirmation will be added when upgrading a storage account from StorageV1 or BlobStorage to StorageV2. Suppress it with -Force.")]
222223
[Parameter(
223224
Mandatory = false,
224225
HelpMessage = "Upgrade Storage Account Kind to StorageV2.")]

src/Storage/Storage/File/Cmdlet/SetAzureStorageFileContent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public class SetAzureStorageFileContent : StorageFileDataManagementCmdletBase, I
9696
[ValidateNotNullOrEmpty]
9797
public string Source { get; set; }
9898

99+
[CmdletParameterBreakingChangeWithVersion("Path", "12.0.0", "7.0.0", ChangeDescription = "When uploading using SAS token without Read permission, the destination path will be taken as a file path, instead of a directory path previously.")]
99100
[Parameter(
100101
Position = 2,
101102
HelpMessage = "Path to the cloud file which would be uploaded to.")]

src/Storage/Storage/Queue/Cmdlet/GetAzureStorageQueue.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue
1919
using global::Azure.Storage.Queues;
2020
using global::Azure.Storage.Queues.Models;
2121
using Microsoft.WindowsAzure.Commands.Storage.Common;
22+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2223
using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
2324
using System;
2425
using System.Globalization;
2526
using System.Management.Automation;
2627
using System.Security.Permissions;
28+
using Microsoft.Azure.Storage.Queue;
2729

2830
/// <summary>
2931
/// list azure queues
3032
/// </summary>
33+
[CmdletOutputBreakingChangeWithVersion(typeof(AzureStorageQueue), "11.0.0", "6.0.0", ChangeDescription = "The child property CloudQueue and EncodeMessage from deprecated v11 SDK will be removed. Use child property QueueClient instead of CloudQueue.")]
3134
[Cmdlet("Get", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageQueue", DefaultParameterSetName = NameParameterSet),OutputType(typeof(AzureStorageQueue))]
3235
public class GetAzureStorageQueueCommand : StorageQueueBaseCmdlet
3336
{

src/Storage/Storage/Queue/Cmdlet/NewAzureStorageQueue.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue
1717
using Commands.Common.Storage.ResourceModel;
1818
using global::Azure.Storage.Queues;
1919
using global::Azure.Storage.Queues.Models;
20+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2021
using Microsoft.WindowsAzure.Commands.Storage.Common;
2122
using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
2223
using System;
2324
using System.Management.Automation;
2425
using System.Security.Permissions;
2526

27+
[CmdletOutputBreakingChangeWithVersion(typeof(AzureStorageQueue), "11.0.0", "6.0.0", ChangeDescription = "The child property CloudQueue and EncodeMessage from deprecated v11 SDK will be removed. Use child property QueueClient instead of CloudQueue.")]
2628
[Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageQueue"),OutputType(typeof(AzureStorageQueue))]
2729
public class NewAzureStorageQueueCommand : StorageQueueBaseCmdlet
2830
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public string Policy
6262
[ValidateNotNullOrEmpty]
6363
public string Permission { get; set; }
6464

65+
[CmdletParameterBreakingChangeWithVersion("Protocol", "12.0.0", "7.0.0", ChangeDescription = "The type of parameter Protocol will be changed from SharedAccessProtocol to string.")]
6566
[Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")]
6667
[ValidateNotNull]
6768
public SharedAccessProtocol? Protocol { get; set; }

0 commit comments

Comments
 (0)