Skip to content

[PS] ActivityLogAlert breaking change of autorest v4 migration #28031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/Monitor/ActivityLogAlert.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ActivityLogAlert")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("6.0.2")]
[assembly: System.Reflection.AssemblyVersionAttribute("6.0.2")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
14 changes: 11 additions & 3 deletions src/Monitor/ActivityLogAlert.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ use-extension:
"@autorest/powershell": "3.x"

directive:
- where:
subject: ActivityLogAlert
set:
breaking-change:
change-description: The types of the properties ActionGroup, ConditionAllOf, Scope, AnyOf, and ContainsAny will be changed from single object or fixed array to 'List'.
deprecated-by-version: 7.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
Expand Down Expand Up @@ -83,9 +91,9 @@ directive:
subject: (ActivityLogAlert)(.*)
set:
subject-prefix: ""

# Add breaking change for them, will add back.
- model-cmdlet:
- AlertRuleAnyOfOrLeafCondition
- AlertRuleLeafCondition
# - AlertRuleAnyOfOrLeafCondition
# - AlertRuleLeafCondition
- ActionGroup
```
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.A
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
#>
function New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject {
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Runtime.CmdletBreakingChange("15.0.0", "7.0.0", "2025/11/03", ChangeDescription="The type of property 'AnyOf' and 'ContainsAny' will be changed from array to List.")]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition')]
[CmdletBinding(PositionalBinding=$false)]
Param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.A
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleLeafConditionObject
#>
function New-AzActivityLogAlertAlertRuleLeafConditionObject {
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Runtime.CmdletBreakingChange("15.0.0", "7.0.0", "2025/11/03", ChangeDescription="The type of property 'ContainsAny' will be changed from array to List.")]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleLeafCondition')]
[CmdletBinding(PositionalBinding=$false)]
Param(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.ActivityLogAlert
Module Guid: 51359a36-98ad-4a4b-878d-564c18864934
Module Guid: dccda9aa-2ba4-49cd-add3-fe720b425f58
Download Help Link: https://learn.microsoft.com/powershell/module/az.activitylogalert
Help Version: 1.0.0.0
Locale: en-US
Expand Down
2 changes: 1 addition & 1 deletion src/Monitor/ActivityLogAlert.Autorest/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "84e197d8-48f1-467b-bdae-e7b8d0aa733a"
"generate_Id": "6ed94251-9849-4c6d-9452-d57c10a21365"
}
11 changes: 11 additions & 0 deletions src/Monitor/ActivityLogAlert.Autorest/resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Resources
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.

## Info
- Modifiable: yes
- Generated: no
- Committed: yes
- Packaged: no

## Purpose
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.
31 changes: 17 additions & 14 deletions src/Monitor/Monitor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFx", "..\..\tools\TestF
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ActionGroup", "..\..\generated\Monitor\ActionGroup.Autorest\Az.ActionGroup.csproj", "{D76924F4-9611-46DC-8F04-B15A105806B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ActivityLogAlert", "..\..\generated\Monitor\ActivityLogAlert.Autorest\Az.ActivityLogAlert.csproj", "{A25F7324-8E75-4640-A6B2-B904378FC7F4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Autoscale", "..\..\generated\Monitor\Autoscale.Autorest\Az.Autoscale.csproj", "{64D875E7-2E3B-40B2-945C-B8891BC6EF41}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DiagnosticSetting", "..\..\generated\Monitor\DiagnosticSetting.Autorest\Az.DiagnosticSetting.csproj", "{32336385-5322-43AC-B6D4-B99CDB5EDA5A}"
Expand All @@ -57,6 +55,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataCollectionRule.Autorest
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataCollectionRule", "..\..\generated\Monitor\DataCollectionRule.Autorest\Az.DataCollectionRule.csproj", "{138B61C0-9D0E-44A1-9EA1-E8142303ECA5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ActivityLogAlert.Autorest", "ActivityLogAlert.Autorest", "{F5B68159-9278-7C75-41B6-315547561DBE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ActivityLogAlert", "..\..\generated\Monitor\ActivityLogAlert.Autorest\Az.ActivityLogAlert.csproj", "{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -235,18 +237,6 @@ Global
{D76924F4-9611-46DC-8F04-B15A105806B8}.Release|x64.Build.0 = Release|Any CPU
{D76924F4-9611-46DC-8F04-B15A105806B8}.Release|x86.ActiveCfg = Release|Any CPU
{D76924F4-9611-46DC-8F04-B15A105806B8}.Release|x86.Build.0 = Release|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x64.ActiveCfg = Debug|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x64.Build.0 = Debug|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x86.ActiveCfg = Debug|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Debug|x86.Build.0 = Debug|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|Any CPU.Build.0 = Release|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x64.ActiveCfg = Release|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x64.Build.0 = Release|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x86.ActiveCfg = Release|Any CPU
{A25F7324-8E75-4640-A6B2-B904378FC7F4}.Release|x86.Build.0 = Release|Any CPU
{64D875E7-2E3B-40B2-945C-B8891BC6EF41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64D875E7-2E3B-40B2-945C-B8891BC6EF41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64D875E7-2E3B-40B2-945C-B8891BC6EF41}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -331,6 +321,18 @@ Global
{138B61C0-9D0E-44A1-9EA1-E8142303ECA5}.Release|x64.Build.0 = Release|Any CPU
{138B61C0-9D0E-44A1-9EA1-E8142303ECA5}.Release|x86.ActiveCfg = Release|Any CPU
{138B61C0-9D0E-44A1-9EA1-E8142303ECA5}.Release|x86.Build.0 = Release|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Debug|x64.ActiveCfg = Debug|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Debug|x64.Build.0 = Debug|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Debug|x86.ActiveCfg = Debug|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Debug|x86.Build.0 = Debug|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Release|Any CPU.Build.0 = Release|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Release|x64.ActiveCfg = Release|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Release|x64.Build.0 = Release|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Release|x86.ActiveCfg = Release|Any CPU
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -350,5 +352,6 @@ Global
{B54BD1A5-F4AB-485B-8478-520B6AA1E9E7} = {5E1B5E7C-8C9C-47AD-8F8F-19628E8D1B34}
{0636EEB2-FE81-4424-8CFC-CCEB25360A40} = {3F76A15C-B128-4A31-A887-05E303CF8D7F}
{138B61C0-9D0E-44A1-9EA1-E8142303ECA5} = {35E5CBAF-5596-AC3C-3DBD-816FC74B54D0}
{FC51CA4D-213B-4F50-B11A-90EA24CBE55A} = {F5B68159-9278-7C75-41B6-315547561DBE}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion src/Monitor/Monitor/Az.Monitor.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ DotNetFrameworkVersion = '4.7.2'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '4.1.0'; })
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.1.0'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'ActionGroup.Autorest/bin/Az.ActionGroup.private.dll',
Expand Down
6 changes: 6 additions & 0 deletions src/Monitor/Monitor/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
-->

## Upcoming Release
* Added breaking change announcement for below cmdlets from single object or fixed array to list.
- `Get-AzActivityLogAlert`
- `New-AzActivityLogAlert`
- `Update-AzActivityLogAlert`
- `New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject`
- `New-AzActivityLogAlertAlertRuleLeafConditionObject`

## Version 6.0.2
* Pipeline Group upgraded API version to 2024-10-01-preview
Expand Down
Loading