Skip to content

Commit c01b69a

Browse files
Addng breaking change notifications to ServiceBus and EventHub namesp… (#21332)
* Addng breaking change notifications to ServiceBus and EventHub namespace cmdlets * fixing mistakes * fixing mistakes * fixing mistakes * ChangeLog * Update ChangeLog.md * Update ChangeLog.md --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent e24a9cd commit c01b69a

14 files changed

+36
-12
lines changed

src/EventHub/EventHub/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added upcoming breaking change notifications for Az.EventHub module.
2122

2223
## Version 3.2.2
2324
* Added breaking change description for parameter `MessageRetentionInDays`, which would be deprecated and would be replaced by `RetentionTimeInHours`

src/EventHub/EventHub/Cmdlets/AzureEventHubsCmdletBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ protected struct SKU
154154
private EventHubsClient _client;
155155

156156
public const string BreakingChangeNotification = "- PLEASE REFER OUR MIGRATION GUIDE https://go.microsoft.com/fwlink/?linkid=2204690 TO KNOW MORE ABOUT BREAKING CHANGES.";
157-
public const string DeprecateByVersion = "Az 9.0";
158-
public const string ChangeInEffectByDate = "12th October, 2022";
157+
public const string DeprecateByVersion = "Az 10.0";
158+
public const string ChangeInEffectByDate = "23rd May, 2023";
159159

160160
public EventHubsClient UtilityClient
161161
{

src/EventHub/EventHub/Cmdlets/Namespace/GetAzureEventHubNamespace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.EventHub.Commands.Namespace
2626
/// <para> If Namespace name provided, a single Namespace detials will be returned</para>
2727
/// <para> If Namespace name not provided, list of Namespace will be returned</para>
2828
/// </summary>
29-
[CmdletOutputBreakingChange(typeof(PSNamespaceAttributes), DeprecatedOutputProperties = new string[] { "ResourceGroup" }, NewOutputProperties = new string[] { "ResourceGroupName", "Tags" })]
29+
[GenericBreakingChange("Output type of the cmdlet would change to `Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEhNamespace`. This cmdlet would henceforth be alias cmdlet with Get-AzEventHubNamespaceV2.", deprecateByVersion: DeprecateByVersion, changeInEfectByDate: ChangeInEffectByDate)]
3030
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "EventHubNamespace"), OutputType(typeof(PSNamespaceAttributes))]
3131
public class GetAzureRmEventHubNamespace : AzureEventHubsCmdletBase
3232
{

src/EventHub/EventHub/Cmdlets/Namespace/NewAzureEventHubNamespace.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.EventHub.Commands.Namespace
2727
/// <summary>
2828
/// this commandlet will let you Create Eventhub namespace.
2929
/// </summary>
30-
[CmdletOutputBreakingChange(typeof(PSNamespaceAttributes), DeprecatedOutputProperties = new string[] {"ResourceGroup", "Identity"}, NewOutputProperties = new string[] { "ResourceGroupName", "Tags", "IdentityType"})]
30+
[GenericBreakingChange("Output type of the cmdlet would change to `Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEhNamespace`. This cmdlet would henceforth be alias cmdlet with New-AzEventHubNamespaceV2.", deprecateByVersion: DeprecateByVersion, changeInEfectByDate: ChangeInEffectByDate)]
3131
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "EventHubNamespace", SupportsShouldProcess = true, DefaultParameterSetName = NamespaceParameterSet), OutputType(typeof(PSNamespaceAttributes))]
3232
public class NewAzureEventHubNamespace : AzureEventHubsCmdletBase
3333
{
@@ -89,6 +89,7 @@ public class NewAzureEventHubNamespace : AzureEventHubsCmdletBase
8989
/// <summary>
9090
/// Upper limit of throughput units when AutoInflate is enabled.
9191
/// </summary>
92+
[CmdletParameterBreakingChange("MaximumThroughputUnits", ReplaceMentCmdletParameterName = "MaximumThroughputUnit")]
9293
[Parameter(Mandatory = false, ParameterSetName = AutoInflateParameterSet, ValueFromPipelineByPropertyName = true, Position = 6, HelpMessage = "Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units.")]
9394
[ValidateRange(0, 40)]
9495
public int? MaximumThroughputUnits { get; set; }
@@ -97,6 +98,7 @@ public class NewAzureEventHubNamespace : AzureEventHubsCmdletBase
9798
/// <summary>
9899
/// Indicates whether Kafka is enabled.
99100
/// </summary>
101+
[GenericBreakingChange("This parameter would be removed in version " + DeprecateByVersion)]
100102
[Parameter(Mandatory = false, ParameterSetName = AutoInflateParameterSet, HelpMessage = "enabling or disabling Kafka for namespace")]
101103
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, HelpMessage = "enabling or disabling Kafka for namespace")]
102104
public SwitchParameter EnableKafka { get; set; }
@@ -139,6 +141,7 @@ public class NewAzureEventHubNamespace : AzureEventHubsCmdletBase
139141
/// <summary>
140142
/// User Assigned Identity Id's
141143
/// </summary>
144+
[CmdletParameterBreakingChange("IdentityId", ReplaceMentCmdletParameterName = "UserAssignedIdentityId")]
142145
[Parameter(Mandatory = false, ParameterSetName = AutoInflateParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "List of user assigned Identity Ids")]
143146
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "List of user assigned Identity Ids")]
144147
public string[] IdentityId { get; set; }
@@ -147,6 +150,7 @@ public class NewAzureEventHubNamespace : AzureEventHubsCmdletBase
147150
/// <summary>
148151
/// List of KeyVaultProperties
149152
/// </summary>
153+
[CmdletParameterBreakingChange("EncryptionConfig", OldParamaterType = typeof(PSEncryptionConfigAttributes[]), ReplaceMentCmdletParameterName = "KeyVaultProperty", NewParameterTypeName = "Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202210Preview.IKeyVaultProperties[]")]
150154
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "Key Property")]
151155
[Parameter(Mandatory = false, ParameterSetName = AutoInflateParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "Key Property")]
152156
public PSEncryptionConfigAttributes[] EncryptionConfig { get; set; }

src/EventHub/EventHub/Cmdlets/Namespace/NewKeyVaultPropertyObject.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
using Microsoft.Azure.Commands.EventHub.Commands;
1616
using Microsoft.Azure.Commands.EventHub.Models;
1717
using Microsoft.Azure.Management.EventHub.Models;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1819
using System;
1920
using System.Collections.Generic;
2021
using System.Management.Automation;
2122
using System.Text;
2223

2324
namespace Microsoft.Azure.Commands.EventHub.Cmdlets.Namespace
2425
{
26+
[GenericBreakingChange("Output type of the cmdlet would change to `Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.KeyVaultProperties`.", deprecateByVersion: DeprecateByVersion, changeInEfectByDate: ChangeInEffectByDate)]
2527
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "EventHubEncryptionConfig", SupportsShouldProcess = false), OutputType(typeof(PSEncryptionConfigAttributes))]
2628
public class NewKeyVaultPropertyObject : AzureEventHubsCmdletBase
2729
{

src/EventHub/EventHub/Cmdlets/Namespace/RemoveAzureEventHubNamespace.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using System.Management.Automation;
1717
using Microsoft.Azure.Commands.EventHub.Models;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1819

1920
namespace Microsoft.Azure.Commands.EventHub.Commands.Namespace
2021
{
@@ -34,10 +35,12 @@ public class RemoveAzureRmEventHubNamespace : AzureEventHubsCmdletBase
3435
[Alias(AliasNamespaceName)]
3536
public string Name { get; set; }
3637

38+
[GenericBreakingChange("The type of the `-InputObject` parameter would change to `Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEhNamespace`.", deprecateByVersion: DeprecateByVersion, changeInEfectByDate: ChangeInEffectByDate)]
3739
[Parameter(Mandatory = true, ParameterSetName = NamespaceInputObjectParameterSet, ValueFromPipeline = true, Position = 0, HelpMessage = "EventHubs Namespace Object")]
3840
[ValidateNotNullOrEmpty]
3941
public PSNamespaceAttributes InputObject { get; set; }
4042

43+
[GenericBreakingChange("This parameter would be removed. Henceforth, resource Id's can be provided as input to `-InputObject` parameter.", deprecateByVersion: DeprecateByVersion, changeInEfectByDate: ChangeInEffectByDate)]
4144
[Parameter(Mandatory = true, ParameterSetName = NamespaceResourceIdParameterSet, ValueFromPipelineByPropertyName = true, Position = 0, HelpMessage = "EventHubs Namespace Resource Id")]
4245
[ValidateNotNullOrEmpty]
4346
public string ResourceId { get; set; }

src/EventHub/EventHub/Cmdlets/Namespace/SetAzureEventHubNamespace.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.EventHub.Commands.Namespace
2828
/// <summary>
2929
/// 'Set-AzEventHubNamespace' Cmdlet updates the specified Eventhub Namespace
3030
/// </summary>
31-
[CmdletOutputBreakingChange(typeof(PSNamespaceAttributes), DeprecatedOutputProperties = new string[] { "ResourceGroup", "IdentityUserDefined", "Identity", "KeyProperty" }, NewOutputProperties = new string[] { "ResourceGroupName", "Tags", "IdentityType", "EncryptionConfig" })]
31+
[GenericBreakingChange("Output type of the cmdlet would change to `Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEhNamespace`. This cmdlet would henceforth be alias cmdlet with Set-AzEventHubNamespaceV2.", deprecateByVersion: DeprecateByVersion, changeInEfectByDate: ChangeInEffectByDate)]
3232
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "EventHubNamespace", SupportsShouldProcess = true, DefaultParameterSetName = NamespaceParameterSet), OutputType(typeof(PSNamespaceAttributes))]
3333
public class SetAzureEventHubNamespace : AzureEventHubsCmdletBase
3434
{
@@ -69,12 +69,14 @@ public class SetAzureEventHubNamespace : AzureEventHubsCmdletBase
6969
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, HelpMessage = "Indicates whether AutoInflate is enabled")]
7070
public SwitchParameter EnableAutoInflate { get; set; }
7171

72-
72+
73+
[CmdletParameterBreakingChange("MaximumThroughputUnits", ReplaceMentCmdletParameterName = "MaximumThroughputUnit")]
7374
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units.")]
7475
[ValidateRange(0,40)]
7576
public int? MaximumThroughputUnits { get; set; }
7677

7778

79+
[GenericBreakingChange("This parameter would be removed in version " + DeprecateByVersion)]
7880
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, HelpMessage = "enabling or disabling Kafka for namespace")]
7981
public SwitchParameter EnableKafka { get; set; }
8082

@@ -88,10 +90,12 @@ public class SetAzureEventHubNamespace : AzureEventHubsCmdletBase
8890
public string IdentityType { get; set; }
8991

9092

93+
[CmdletParameterBreakingChange("IdentityId", ReplaceMentCmdletParameterName = "UserAssignedIdentityId")]
9194
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "List of user assigned Identity Ids")]
9295
public string[] IdentityId { get; set; }
9396

94-
97+
98+
[CmdletParameterBreakingChange("EncryptionConfig", OldParamaterType = typeof(PSEncryptionConfigAttributes[]), ReplaceMentCmdletParameterName = "KeyVaultProperty", NewParameterTypeName = "Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202210Preview.IKeyVaultProperties[]")]
9599
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "Key Property")]
96100
public PSEncryptionConfigAttributes[] EncryptionConfig { get; set; }
97101

src/ServiceBus/ServiceBus/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Additional information about change #1
2020
-->
2121
## Upcoming Release
22+
* Added upcoming breaking change notifications for Az.ServiceBus module.
2223

2324
## Version 2.2.0
2425
* Upgraded API version to 2022-10-01-preview

src/ServiceBus/ServiceBus/Cmdlets/AzureServiceBusCmdletBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ protected struct RegeneKeys
159159
}
160160

161161
public const string BreakingChangeNotification = "- PLEASE REFER OUR MIGRATION GUIDE https://go.microsoft.com/fwlink/?linkid=2204584 TO KNOW MORE ABOUT BREAKING CHANGES.";
162-
public const string DeprecateByVersion = "Az 9.0";
163-
public const string ChangeInEffectByDate = "12th October, 2022";
162+
public const string DeprecateByVersion = "Az 10.0";
163+
public const string ChangeInEffectByDate = "23rd May, 2023";
164164
public const string TimespanBreakingChange = "Input type of the parameter has been changed from System.String to System.Timespan. Hence, ISO 8601 format for timespan can NO longer be fed as input to these parameters. Please use New-TimeSpan cmdlet object to construct Timespan variables.";
165165

166166
public static TimeSpan ParseTimespan(string strTimespan)

src/ServiceBus/ServiceBus/Cmdlets/Namespace/GetAzureServiceBusNamespace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.ServiceBus.Commands.Namespace
2727
/// <para> If Namespace name provided, a single Namespace detials will be returned</para>
2828
/// <para> If Namespace name not provided, list of Namespace will be returned</para>
2929
/// </summary>
30-
[CmdletOutputBreakingChange(typeof(PSNamespaceAttributes), DeprecatedOutputProperties = new string[] { "ResourceGroup" }, NewOutputProperties = new string[] { "ResourceGroupName"})]
30+
[GenericBreakingChange("Output type of the cmdlet would change to `Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.Api20221001Preview.ISbNamespace`. This cmdlet would henceforth be alias cmdlet with Get-AzServiceBusNamespaceV2.", deprecateByVersion: DeprecateByVersion, changeInEfectByDate: ChangeInEffectByDate)]
3131
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ServiceBusNamespace"), OutputType(typeof(PSNamespaceAttributes))]
3232
public class GetAzureRmServiceBusNamespace : AzureServiceBusCmdletBase
3333
{

0 commit comments

Comments
 (0)