Skip to content

Commit f27c4e6

Browse files
authored
[PS] ActivityLogAlert breaking change of autorest v4 migration (#28031)
1 parent 9c29827 commit f27c4e6

File tree

10 files changed

+117
-22
lines changed

10 files changed

+117
-22
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ActivityLogAlert")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("6.0.2")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("6.0.2")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

src/Monitor/ActivityLogAlert.Autorest/README.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,52 @@ use-extension:
5151
"@autorest/powershell": "3.x"
5252

5353
directive:
54+
- where:
55+
verb: Get
56+
subject: ActivityLogAlert
57+
set:
58+
breaking-change:
59+
deprecated-output-properties:
60+
- ActionGroup
61+
- ConditionAllOf
62+
- Scope
63+
new-output-properties:
64+
- ActionGroup
65+
- ConditionAllOf
66+
- Scope
67+
change-description: The types of the properties ActionGroup, ConditionAllOf and Scope will be changed from single object or fixed array to 'List'.
68+
deprecated-by-version: 7.0.0
69+
deprecated-by-azversion: 15.0.0
70+
change-effective-date: 2025/11/03
71+
- where:
72+
verb: New|Update
73+
subject: ActivityLogAlert
74+
set:
75+
breaking-change:
76+
deprecated-output-properties:
77+
- ActionGroup
78+
- ConditionAllOf
79+
- Scope
80+
- AnyOf
81+
new-output-properties:
82+
- ActionGroup
83+
- ConditionAllOf
84+
- Scope
85+
- AnyOf
86+
change-description: The types of the properties ActionGroup, ConditionAllOf, Scope and AnyOf will be changed from single object or fixed array to 'List'.
87+
deprecated-by-version: 7.0.0
88+
deprecated-by-azversion: 15.0.0
89+
change-effective-date: 2025/11/03
90+
- where:
91+
parameter-name: Action|Condition|Scope
92+
set:
93+
breaking-change:
94+
old-parameter-type: Array
95+
new-parameter-type: List
96+
deprecated-by-version: 7.0.0
97+
deprecated-by-azversion: 15.0.0
98+
change-effective-date: 2025/11/03
99+
54100
# Following is two common directive which are normally required in all the RPs
55101
# 1. Remove the unexpanded parameter set
56102
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
@@ -83,9 +129,9 @@ directive:
83129
subject: (ActivityLogAlert)(.*)
84130
set:
85131
subject-prefix: ""
86-
132+
# Add breaking change for them, will add back.
87133
- model-cmdlet:
88-
- AlertRuleAnyOfOrLeafCondition
89-
- AlertRuleLeafCondition
134+
# - AlertRuleAnyOfOrLeafCondition
135+
# - AlertRuleLeafCondition
90136
- ActionGroup
91137
```
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.A
2626
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
2727
#>
2828
function New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject {
29+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition","15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties='"ContainsAny","AnyOf[]"', NewOutputProperties='"List[ContainsAny]","List[AnyOf]"')]
2930
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition')]
3031
[CmdletBinding(PositionalBinding=$false)]
3132
Param(
32-
33+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Runtime.ParameterBreakingChange("AnyOf", "15.0.0", "7.0.0", "2025/11/03", OldParamaterType="Array", NewParameterType="List")]
3334
[Parameter(HelpMessage="An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met.")]
3435
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.IAlertRuleLeafCondition[]]
3536
$AnyOf,
37+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Runtime.ParameterBreakingChange("ContainsAny", "15.0.0", "7.0.0", "2025/11/03", OldParamaterType="Array", NewParameterType="List")]
3638
[Parameter(HelpMessage="The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met.")]
3739
[string[]]
3840
$ContainsAny,
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.A
2626
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleLeafConditionObject
2727
#>
2828
function New-AzActivityLogAlertAlertRuleLeafConditionObject {
29+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleLeafCondition", "15.0.0", "7.0.0", "2025/11/03", DeprecatedOutputProperties="ContainsAny", NewOutputProperties="List[ContainsAny]")]
2930
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleLeafCondition')]
3031
[CmdletBinding(PositionalBinding=$false)]
3132
Param(
32-
33+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Runtime.ParameterBreakingChange("ContainsAny", "15.0.0", "7.0.0", "2025/11/03", OldParamaterType="Array", NewParameterType="List")]
3334
[Parameter(HelpMessage="The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met.")]
3435
[string[]]
3536
$ContainsAny,

src/Monitor/ActivityLogAlert.Autorest/docs/Az.ActivityLogAlert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.ActivityLogAlert
3-
Module Guid: 51359a36-98ad-4a4b-878d-564c18864934
3+
Module Guid: 83e58f08-b015-404d-8cf1-9115293f74af
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.activitylogalert
55
Help Version: 1.0.0.0
66
Locale: en-US
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"generate_Id": "84e197d8-48f1-467b-bdae-e7b8d0aa733a"
2+
"generate_Id": "8b11ea6d-f253-44c4-8fa0-a99b6d6e2f72"
33
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Resources
2+
This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder.
3+
4+
## Info
5+
- Modifiable: yes
6+
- Generated: no
7+
- Committed: yes
8+
- Packaged: no
9+
10+
## Purpose
11+
Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact.

src/Monitor/Monitor.sln

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFx", "..\..\tools\TestF
3737
EndProject
3838
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ActionGroup", "..\..\generated\Monitor\ActionGroup.Autorest\Az.ActionGroup.csproj", "{D76924F4-9611-46DC-8F04-B15A105806B8}"
3939
EndProject
40-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ActivityLogAlert", "..\..\generated\Monitor\ActivityLogAlert.Autorest\Az.ActivityLogAlert.csproj", "{A25F7324-8E75-4640-A6B2-B904378FC7F4}"
41-
EndProject
4240
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Autoscale", "..\..\generated\Monitor\Autoscale.Autorest\Az.Autoscale.csproj", "{64D875E7-2E3B-40B2-945C-B8891BC6EF41}"
4341
EndProject
4442
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DiagnosticSetting", "..\..\generated\Monitor\DiagnosticSetting.Autorest\Az.DiagnosticSetting.csproj", "{32336385-5322-43AC-B6D4-B99CDB5EDA5A}"
@@ -59,6 +57,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Metricdata.Autorest", "Metr
5957
EndProject
6058
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Metricdata", "..\..\generated\Monitor\Metricdata.Autorest\Az.Metricdata.csproj", "{0A51A656-9092-4C82-83B5-524516C8FED7}"
6159
EndProject
60+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ActivityLogAlert.Autorest", "ActivityLogAlert.Autorest", "{F5B68159-9278-7C75-41B6-315547561DBE}"
61+
EndProject
62+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ActivityLogAlert", "..\..\generated\Monitor\ActivityLogAlert.Autorest\Az.ActivityLogAlert.csproj", "{0D41ADE3-ABBA-445B-8990-EA015AD4203D}"
63+
EndProject
6264
Global
6365
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6466
Debug|Any CPU = Debug|Any CPU
@@ -237,18 +239,6 @@ Global
237239
{D76924F4-9611-46DC-8F04-B15A105806B8}.Release|x64.Build.0 = Release|Any CPU
238240
{D76924F4-9611-46DC-8F04-B15A105806B8}.Release|x86.ActiveCfg = Release|Any CPU
239241
{D76924F4-9611-46DC-8F04-B15A105806B8}.Release|x86.Build.0 = Release|Any CPU
240-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
241-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
242-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x64.ActiveCfg = Debug|Any CPU
243-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x64.Build.0 = Debug|Any CPU
244-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x86.ActiveCfg = Debug|Any CPU
245-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x86.Build.0 = Debug|Any CPU
246-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
247-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|Any CPU.Build.0 = Release|Any CPU
248-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x64.ActiveCfg = Release|Any CPU
249-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x64.Build.0 = Release|Any CPU
250-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x86.ActiveCfg = Release|Any CPU
251-
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x86.Build.0 = Release|Any CPU
252242
{64D875E7-2E3B-40B2-945C-B8891BC6EF41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
253243
{64D875E7-2E3B-40B2-945C-B8891BC6EF41}.Debug|Any CPU.Build.0 = Debug|Any CPU
254244
{64D875E7-2E3B-40B2-945C-B8891BC6EF41}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -345,6 +335,18 @@ Global
345335
{0A51A656-9092-4C82-83B5-524516C8FED7}.Release|x64.Build.0 = Release|Any CPU
346336
{0A51A656-9092-4C82-83B5-524516C8FED7}.Release|x86.ActiveCfg = Release|Any CPU
347337
{0A51A656-9092-4C82-83B5-524516C8FED7}.Release|x86.Build.0 = Release|Any CPU
338+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
339+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|Any CPU.Build.0 = Debug|Any CPU
340+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x64.ActiveCfg = Debug|Any CPU
341+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x64.Build.0 = Debug|Any CPU
342+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x86.ActiveCfg = Debug|Any CPU
343+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x86.Build.0 = Debug|Any CPU
344+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|Any CPU.ActiveCfg = Release|Any CPU
345+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|Any CPU.Build.0 = Release|Any CPU
346+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x64.ActiveCfg = Release|Any CPU
347+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x64.Build.0 = Release|Any CPU
348+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x86.ActiveCfg = Release|Any CPU
349+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x86.Build.0 = Release|Any CPU
348350
EndGlobalSection
349351
GlobalSection(SolutionProperties) = preSolution
350352
HideSolutionNode = FALSE
@@ -365,5 +367,6 @@ Global
365367
{0636EEB2-FE81-4424-8CFC-CCEB25360A40} = {3F76A15C-B128-4A31-A887-05E303CF8D7F}
366368
{138B61C0-9D0E-44A1-9EA1-E8142303ECA5} = {35E5CBAF-5596-AC3C-3DBD-816FC74B54D0}
367369
{0A51A656-9092-4C82-83B5-524516C8FED7} = {97973F8C-3EE1-368A-3B71-C62280C2DC8C}
370+
{0D41ADE3-ABBA-445B-8990-EA015AD4203D} = {F5B68159-9278-7C75-41B6-315547561DBE}
368371
EndGlobalSection
369372
EndGlobal

src/Monitor/Monitor/Az.Monitor.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 7/2/2025
6+
# Generated on: 7/18/2025
77
#
88

99
@{

src/Monitor/Monitor/ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added breaking change announcement for below cmdlets from single object or fixed array to list.
23+
- `Get-AzActivityLogAlert`
24+
- `New-AzActivityLogAlert`
25+
- `Update-AzActivityLogAlert`
26+
- `New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject`
27+
- `New-AzActivityLogAlertAlertRuleLeafConditionObject`
2228

2329
## Version 6.0.2
2430
* Pipeline Group upgraded API version to 2024-10-01-preview

0 commit comments

Comments
 (0)