Skip to content

Commit c49e228

Browse files
authored
breaking change for monitor action group (#22673)
1 parent 4e216a4 commit c49e228

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

src/Monitor/Monitor/ActionGroups/NewAzureRmActionGroupReceiverCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.Insights.ActionGroups
2121
/// <summary>
2222
/// Create an ActionGroup receiver
2323
/// </summary>
24+
[WindowsAzure.Commands.Common.CustomAttributes.GenericBreakingChangeWithVersion("Parameters about receiver will be replaced by child types.", "11.0.0", "5.0.0", "2023/11/15")]
2425
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ActionGroupReceiver", DefaultParameterSetName = NewEmailReceiver)]
2526
[OutputType(typeof(PSActionGroupReceiverBase))]
2627
public class NewAzureRmActionGroupReceiverCommand : AzureRMCmdlet

src/Monitor/Monitor/ActionGroups/RemoveAzureRmActionGroupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace Microsoft.Azure.Commands.Insights.ActionGroups
2727
/// <summary>
2828
/// Gets an Azure Action Group.
2929
/// </summary>
30+
[WindowsAzure.Commands.Common.CustomAttributes.GenericBreakingChangeWithVersion("Parameter set ByResourceId will be deprecated", "11.0.0", "5.0.0", "2023/11/15")]
3031
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ActionGroup", DefaultParameterSetName = ByPropertyName, SupportsShouldProcess = true)]
3132
[OutputType(typeof(AzureOperationResponse))]
3233
public class RemoveAzureRmActionGroupCommand : ManagementCmdletBase

src/Monitor/Monitor/ActionGroups/SetAzureRmActionGroupCommand.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ public class SetAzureRmActionGroupCommand : ManagementCmdletBase
6868
/// <summary>
6969
/// Gets or sets the list of email receivers.
7070
/// </summary>
71+
[WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("Receiver", "11.0.0", "5.0.0", "2023/11/15", ChangeDescription = "Parameters receiver will be replaced by child parameters.")]
7172
[Parameter(ParameterSetName = ByPropertyName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The list of receivers")]
7273
[Parameter(ParameterSetName = ByResourceId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The list of receivers")]
7374
public List<PSActionGroupReceiverBase> Receiver { get; set; }
7475

7576
/// <summary>
7677
/// Gets or sets the DisableGroup flag.
7778
/// </summary>
79+
[WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("DisableGroup", "11.0.0", "5.0.0", "2023/11/15", ChangeDescription = "Parameter DisableGroup will be replaced by Enabled", NewWay = "Enabled")]
7880
[Parameter(ParameterSetName = ByPropertyName, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Whether or not the action group should be enabled")]
7981
[Parameter(ParameterSetName = ByResourceId, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Whether or not the action group should be enabled")]
8082
[Parameter(ParameterSetName = ByInputObject, Mandatory = false, HelpMessage = "Whether or not the action group should be enabled")]
@@ -83,6 +85,7 @@ public class SetAzureRmActionGroupCommand : ManagementCmdletBase
8385
/// <summary>
8486
/// Gets or sets the Tags of the action group resource
8587
/// </summary>
88+
[WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("Tag", "11.0.0", "5.0.0", "2023/11/15",OldParamaterType = typeof(System.Collections.IDictionary), NewParameterTypeName = "Hashtable")]
8689
[Parameter(ParameterSetName = ByPropertyName, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The tags of the action group resource")]
8790
[Parameter(ParameterSetName = ByResourceId, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The tags of the action group resource")]
8891
[Parameter(ParameterSetName = ByInputObject, Mandatory = false, ValueFromPipeline = true, HelpMessage = "The tags of the action group resource")]
@@ -101,6 +104,7 @@ public class SetAzureRmActionGroupCommand : ManagementCmdletBase
101104
/// <summary>
102105
/// Gets or sets the resource id parameter.
103106
/// </summary>
107+
[WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("ResourceId", "11.0.0", "5.0.0", "2023/11/15", ChangeDescription = "Parameter set ByResourceId will be deprecated")]
104108
[Parameter(ParameterSetName = ByResourceId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource id")]
105109
[ValidateNotNullOrEmpty]
106110
public string ResourceId { get; set; }

src/Monitor/Monitor/ActionGroups/TestAzureRmActionGroupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace Microsoft.Azure.Commands.Insights.ActionGroups
2828
using ResourceManager.Common.ArgumentCompleters;
2929

3030
/// <summary> Create new test notifications </summary>
31+
[WindowsAzure.Commands.Common.CustomAttributes.CmdletDeprecationWithVersion("11.0.0", "5.0.0", "2023/11/15", ReplacementCmdletName = "New-AzActionGroupNotification")]
3132
[Cmdlet("Test", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ActionGroup", DefaultParameterSetName = ByPropertyName, SupportsShouldProcess = true)]
3233
[OutputType(typeof(PSTestNotificationDetailsResponse))]
3334
public class TestAzureRmActionGroupCommand : ManagementCmdletBase

src/Monitor/Monitor/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* Fixed `Add-AzMetriAlertRuleV2` and `Get-AzMetricAlertRuleV2` to support web tests criteria [#22350]
2424
* Added parameter `Dimension` for `Get-AzMetric` to easily filter metrics by dimensions [#22320]
2525
* Added breaking change for Data Collection Rule
26+
* Added breaking change for Action Group
2627

2728
## Version 4.5.0
2829
* Added cmdlets for monitor workspace:

0 commit comments

Comments
 (0)