Skip to content

[PS][Monitor] Add breaking change for ScheduledQueryRule #28227

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 2 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
31 changes: 17 additions & 14 deletions src/Monitor/Monitor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.MonitorWorkspace", "..\.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.PipelineGroup", "..\..\generated\Monitor\PipelineGroup.Autorest\Az.PipelineGroup.csproj", "{BBB1BE4E-4595-4589-AB2B-14BCFF7EB65C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ScheduledQueryRule", "..\..\generated\Monitor\ScheduledQueryRule.Autorest\Az.ScheduledQueryRule.csproj", "{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ApplicationInsights", "..\..\generated\ApplicationInsights\ApplicationInsights.Autorest\Az.ApplicationInsights.csproj", "{988AD78A-B61E-4D34-968B-05A014140ACF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataCollectionRule.Autorest", "DataCollectionRule.Autorest", "{35E5CBAF-5596-AC3C-3DBD-816FC74B54D0}"
Expand All @@ -61,6 +59,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ActivityLogAlert.Autorest",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ActivityLogAlert", "..\..\generated\Monitor\ActivityLogAlert.Autorest\Az.ActivityLogAlert.csproj", "{0D41ADE3-ABBA-445B-8990-EA015AD4203D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ScheduledQueryRule.Autorest", "ScheduledQueryRule.Autorest", "{DFE9A16E-4879-AFA3-BD8B-DBC73F42D0CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ScheduledQueryRule", "..\..\generated\Monitor\ScheduledQueryRule.Autorest\Az.ScheduledQueryRule.csproj", "{C66471D5-1B5E-42DA-B26B-FF83E4487B59}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -287,18 +289,6 @@ Global
{BBB1BE4E-4595-4589-AB2B-14BCFF7EB65C}.Release|x64.Build.0 = Release|Any CPU
{BBB1BE4E-4595-4589-AB2B-14BCFF7EB65C}.Release|x86.ActiveCfg = Release|Any CPU
{BBB1BE4E-4595-4589-AB2B-14BCFF7EB65C}.Release|x86.Build.0 = Release|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Debug|x64.ActiveCfg = Debug|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Debug|x64.Build.0 = Debug|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Debug|x86.Build.0 = Debug|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Release|Any CPU.Build.0 = Release|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Release|x64.ActiveCfg = Release|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Release|x64.Build.0 = Release|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Release|x86.ActiveCfg = Release|Any CPU
{7CDB5277-30F0-4C26-97D9-DD08A11AA3B2}.Release|x86.Build.0 = Release|Any CPU
{988AD78A-B61E-4D34-968B-05A014140ACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{988AD78A-B61E-4D34-968B-05A014140ACF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{988AD78A-B61E-4D34-968B-05A014140ACF}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -347,6 +337,18 @@ Global
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x64.Build.0 = Release|Any CPU
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x86.ActiveCfg = Release|Any CPU
{0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x86.Build.0 = Release|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Debug|x64.ActiveCfg = Debug|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Debug|x64.Build.0 = Debug|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Debug|x86.ActiveCfg = Debug|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Debug|x86.Build.0 = Debug|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Release|Any CPU.Build.0 = Release|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Release|x64.ActiveCfg = Release|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Release|x64.Build.0 = Release|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Release|x86.ActiveCfg = Release|Any CPU
{C66471D5-1B5E-42DA-B26B-FF83E4487B59}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -368,5 +370,6 @@ Global
{138B61C0-9D0E-44A1-9EA1-E8142303ECA5} = {35E5CBAF-5596-AC3C-3DBD-816FC74B54D0}
{0A51A656-9092-4C82-83B5-524516C8FED7} = {97973F8C-3EE1-368A-3B71-C62280C2DC8C}
{0D41ADE3-ABBA-445B-8990-EA015AD4203D} = {F5B68159-9278-7C75-41B6-315547561DBE}
{C66471D5-1B5E-42DA-B26B-FF83E4487B59} = {DFE9A16E-4879-AFA3-BD8B-DBC73F42D0CA}
EndGlobalSection
EndGlobal
5 changes: 5 additions & 0 deletions src/Monitor/Monitor/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
- `Update-AzActivityLogAlert`
- `New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject`
- `New-AzActivityLogAlertAlertRuleLeafConditionObject`
- `Get-AzScheduledQueryRule`
- `New-AzScheduledQueryRule`
- `New-AzScheduledQueryRuleConditionObject`
- `New-AzScheduledQueryRuleDimensionObject`
- `Update-AzScheduledQueryRule`

## Version 6.0.2
* Pipeline Group upgraded API version to 2024-10-01-preview
Expand Down
26 changes: 26 additions & 0 deletions src/Monitor/ScheduledQueryRule.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 - ScheduledQueryRule")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("6.0.2")]
[assembly: System.Reflection.AssemblyVersionAttribute("6.0.2")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
55 changes: 52 additions & 3 deletions src/Monitor/ScheduledQueryRule.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,56 @@ directive:
- from: source-file-csharp
where: $
transform: $ = $.replace('public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator Equals = @"Equals";', 'public static Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator Equal = @"Equals";');
- model-cmdlet:
- Condition
- Dimension
# - model-cmdlet:
# - Condition
# - Dimension
- where:
verb: New
subject: ScheduledQueryRule
set:
breaking-change:
deprecated-output-properties:
- ActionGroup
- CriterionAllOf
- Dimension
- Scope
- TargetResourceType
new-output-properties:
- ActionGroup
- Dimension
- CriterionAllOf
- Scope
- TargetResourceType
change-description: The types of the properties ActionGroup, CriterionAllOf, Scope and TargetResourceType will be changed from single object or fixed array to 'List'. The type of property 'Dimension' of type 'ICondition' 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
- where:
verb: Get|Update
subject: ScheduledQueryRule
set:
breaking-change:
deprecated-output-properties:
- ActionGroup
- CriterionAllOf
- Scope
- TargetResourceType
new-output-properties:
- ActionGroup
- CriterionAllOf
- Scope
- TargetResourceType
change-description: The types of the properties ActionGroup, CriterionAllOf, Scope and TargetResourceType 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
- where:
parameter-name: Dimension|Value
set:
breaking-change:
old-parameter-type: Array
new-parameter-type: List
deprecated-by-version: 7.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
```
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function New-AzScheduledQueryRuleConditionObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Runtime.ParameterBreakingChange("Dimension", "15.0.0", "7.0.0", "2025/11/03", OldParamaterType="Array", NewParameterType="List")]
[Parameter(HelpMessage="List of Dimensions conditions.")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IDimension[]]
$Dimension,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function New-AzScheduledQueryRuleDimensionObject {
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator])]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator]
$Operator,
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Runtime.ParameterBreakingChange("Value", "15.0.0", "7.0.0", "2025/11/03", OldParamaterType="Array", NewParameterType="List")]
[Parameter(Mandatory, HelpMessage="List of dimension values.")]
[string[]]
$Value
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.ScheduledQueryRule
Module Guid: 5d68afef-2016-4216-9fb2-5e000f70d2be
Module Guid: 806a79ac-f0d4-4c15-92e5-3b6fc73a71cd
Download Help Link: https://learn.microsoft.com/powershell/module/az.scheduledqueryrule
Help Version: 1.0.0.0
Locale: en-US
Expand Down
2 changes: 1 addition & 1 deletion src/Monitor/ScheduledQueryRule.Autorest/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "af0c64e6-c8aa-4f64-a475-c7245b1aa47c"
"generate_Id": "da87f7cc-dbeb-4ede-9ab3-80a0b4996783"
}
11 changes: 11 additions & 0 deletions src/Monitor/ScheduledQueryRule.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.