diff --git a/src/Monitor/Monitor.sln b/src/Monitor/Monitor.sln index d43fcb5ea1c7..ac98a2093daa 100644 --- a/src/Monitor/Monitor.sln +++ b/src/Monitor/Monitor.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 @@ -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.MonitorWorkspace", "..\..\generated\Monitor\MonitorWorkspace.Autorest\Az.MonitorWorkspace.csproj", "{803B981D-ED22-4DFF-90FA-C278DE8D228B}" -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.ApplicationInsights", "..\..\generated\ApplicationInsights\ApplicationInsights.Autorest\Az.ApplicationInsights.csproj", "{988AD78A-B61E-4D34-968B-05A014140ACF}" @@ -69,7 +67,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.MonitorWorkspace", "..\. 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", "{A3CBC4A9-A39C-4343-99F2-F3F53F20049B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ScheduledQueryRule", "..\..\generated\Monitor\ScheduledQueryRule.Autorest\Az.ScheduledQueryRule.csproj", "{0319911B-F2AD-483F-AC8B-9EA44666E545}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -249,18 +247,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 - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Debug|x64.ActiveCfg = Debug|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Debug|x64.Build.0 = Debug|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Debug|x86.ActiveCfg = Debug|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Debug|x86.Build.0 = Debug|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Release|Any CPU.Build.0 = Release|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Release|x64.ActiveCfg = Release|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Release|x64.Build.0 = Release|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Release|x86.ActiveCfg = Release|Any CPU - {803B981D-ED22-4DFF-90FA-C278DE8D228B}.Release|x86.Build.0 = Release|Any CPU {BBB1BE4E-4595-4589-AB2B-14BCFF7EB65C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BBB1BE4E-4595-4589-AB2B-14BCFF7EB65C}.Debug|Any CPU.Build.0 = Debug|Any CPU {BBB1BE4E-4595-4589-AB2B-14BCFF7EB65C}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -297,18 +283,30 @@ 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 - {0A51A656-9092-4C82-83B5-524516C8FED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Debug|x64.ActiveCfg = Debug|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Debug|x64.Build.0 = Debug|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Debug|x86.ActiveCfg = Debug|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Debug|x86.Build.0 = Debug|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Release|Any CPU.Build.0 = Release|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Release|x64.ActiveCfg = Release|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Release|x64.Build.0 = Release|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Release|x86.ActiveCfg = Release|Any CPU - {0A51A656-9092-4C82-83B5-524516C8FED7}.Release|x86.Build.0 = Release|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x64.ActiveCfg = Debug|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x64.Build.0 = Debug|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x86.ActiveCfg = Debug|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x86.Build.0 = Debug|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|Any CPU.Build.0 = Release|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x64.ActiveCfg = Release|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x64.Build.0 = Release|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x86.ActiveCfg = Release|Any CPU + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x86.Build.0 = Release|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x64.ActiveCfg = Debug|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x64.Build.0 = Debug|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x86.ActiveCfg = Debug|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x86.Build.0 = Debug|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|Any CPU.Build.0 = Release|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x64.ActiveCfg = Release|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x64.Build.0 = Release|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x86.ActiveCfg = Release|Any CPU + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x86.Build.0 = Release|Any CPU {81F263BA-D395-42CB-A7E0-AFC20029C4BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {81F263BA-D395-42CB-A7E0-AFC20029C4BC}.Debug|Any CPU.Build.0 = Debug|Any CPU {81F263BA-D395-42CB-A7E0-AFC20029C4BC}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -333,42 +331,6 @@ Global {88085FD3-B4EE-4AC4-94B7-D1D2A9A18033}.Release|x64.Build.0 = Release|Any CPU {88085FD3-B4EE-4AC4-94B7-D1D2A9A18033}.Release|x86.ActiveCfg = Release|Any CPU {88085FD3-B4EE-4AC4-94B7-D1D2A9A18033}.Release|x86.Build.0 = Release|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x64.ActiveCfg = Debug|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x64.Build.0 = Debug|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x86.ActiveCfg = Debug|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Debug|x86.Build.0 = Debug|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|Any CPU.Build.0 = Release|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x64.ActiveCfg = Release|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x64.Build.0 = Release|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x86.ActiveCfg = Release|Any CPU - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627}.Release|x86.Build.0 = Release|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x64.ActiveCfg = Debug|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x64.Build.0 = Debug|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x86.ActiveCfg = Debug|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Debug|x86.Build.0 = Debug|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|Any CPU.Build.0 = Release|Any CPU - {0D41ADE3-ABBA-445B-8990-EA015AD4203D}.Release|x64.ActiveCfg = Release|Any CPU - {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 - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Debug|x64.ActiveCfg = Debug|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Debug|x64.Build.0 = Debug|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Debug|x86.ActiveCfg = Debug|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Debug|x86.Build.0 = Debug|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Release|Any CPU.Build.0 = Release|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Release|x64.ActiveCfg = Release|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Release|x64.Build.0 = Release|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Release|x86.ActiveCfg = Release|Any CPU - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B}.Release|x86.Build.0 = Release|Any CPU {3BDF8EC5-1C35-4425-AB3C-6EF677F618E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3BDF8EC5-1C35-4425-AB3C-6EF677F618E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {3BDF8EC5-1C35-4425-AB3C-6EF677F618E2}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -381,18 +343,30 @@ Global {3BDF8EC5-1C35-4425-AB3C-6EF677F618E2}.Release|x64.Build.0 = Release|Any CPU {3BDF8EC5-1C35-4425-AB3C-6EF677F618E2}.Release|x86.ActiveCfg = Release|Any CPU {3BDF8EC5-1C35-4425-AB3C-6EF677F618E2}.Release|x86.Build.0 = Release|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x64.ActiveCfg = Debug|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x64.Build.0 = Debug|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x86.ActiveCfg = Debug|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Debug|x86.Build.0 = Debug|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|Any CPU.Build.0 = Release|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x64.ActiveCfg = Release|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x64.Build.0 = Release|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x86.ActiveCfg = Release|Any CPU - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4}.Release|x86.Build.0 = Release|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Debug|x64.ActiveCfg = Debug|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Debug|x64.Build.0 = Debug|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Debug|x86.ActiveCfg = Debug|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Debug|x86.Build.0 = Debug|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Release|Any CPU.Build.0 = Release|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Release|x64.ActiveCfg = Release|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Release|x64.Build.0 = Release|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Release|x86.ActiveCfg = Release|Any CPU + {B97A8A95-CCBB-421E-8586-AFCED12A1737}.Release|x86.Build.0 = Release|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Debug|x64.ActiveCfg = Debug|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Debug|x64.Build.0 = Debug|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Debug|x86.ActiveCfg = Debug|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Debug|x86.Build.0 = Debug|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Release|Any CPU.Build.0 = Release|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Release|x64.ActiveCfg = Release|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Release|x64.Build.0 = Release|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Release|x86.ActiveCfg = Release|Any CPU + {0319911B-F2AD-483F-AC8B-9EA44666E545}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -412,14 +386,16 @@ 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} - {0A51A656-9092-4C82-83B5-524516C8FED7} = {97973F8C-3EE1-368A-3B71-C62280C2DC8C} - {0D41ADE3-ABBA-445B-8990-EA015AD4203D} = {F5B68159-9278-7C75-41B6-315547561DBE} - {A3CBC4A9-A39C-4343-99F2-F3F53F20049B} = {DFE9A16E-4879-AFA3-BD8B-DBC73F42D0CA} + {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4} = {97973F8C-3EE1-368A-3B71-C62280C2DC8C} + {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627} = {0832AC06-44A1-FEDA-3879-082134F4AAB5} {81F263BA-D395-42CB-A7E0-AFC20029C4BC} = {F5B68159-9278-7C75-41B6-315547561DBE} {88085FD3-B4EE-4AC4-94B7-D1D2A9A18033} = {4644B825-05AB-0B45-5567-89C0D700A638} - {A55047D2-EBBB-4C25-BD5E-52FEF9E5C627} = {0832AC06-44A1-FEDA-3879-082134F4AAB5} - {0D41ADE3-ABBA-445B-8990-EA015AD4203D} = {F5B68159-9278-7C75-41B6-315547561DBE} {3BDF8EC5-1C35-4425-AB3C-6EF677F618E2} = {635E4282-7AFB-1B5B-749B-823438FF2057} - {ABBBEF38-2D27-4BBA-B980-BEEBDC2843F4} = {97973F8C-3EE1-368A-3B71-C62280C2DC8C} + {B97A8A95-CCBB-421E-8586-AFCED12A1737} = {635E4282-7AFB-1B5B-749B-823438FF2057} + + {0319911B-F2AD-483F-AC8B-9EA44666E545} = {DFE9A16E-4879-AFA3-BD8B-DBC73F42D0CA} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F718DE3F-FFE5-495E-949B-084513A4C606} EndGlobalSection EndGlobal diff --git a/src/Monitor/Monitor/Az.Monitor.psd1 b/src/Monitor/Monitor/Az.Monitor.psd1 index 27dbec0eb143..2ca21a8efb76 100644 --- a/src/Monitor/Monitor/Az.Monitor.psd1 +++ b/src/Monitor/Monitor/Az.Monitor.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 7/30/2025 +# Generated on: 8/7/2025 # @{ @@ -68,10 +68,10 @@ RequiredAssemblies = 'ActionGroup.Autorest/bin/Az.ActionGroup.private.dll', 'ScheduledQueryRule.Autorest/bin/Az.ScheduledQueryRule.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'ActionGroup.Autorest/Az.ActionGroup.format.ps1xml', @@ -198,7 +198,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','Monitor' + Tags = 'Azure', 'ResourceManager', 'ARM', 'Monitor' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -249,7 +249,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/Monitor/Monitor/help/Az.Monitor.md b/src/Monitor/Monitor/help/Az.Monitor.md index 0ef3a0d17020..8f91bce149ff 100644 --- a/src/Monitor/Monitor/help/Az.Monitor.md +++ b/src/Monitor/Monitor/help/Az.Monitor.md @@ -253,7 +253,7 @@ Create an in-memory object for PlatformTelemetryDataSource. Create an in-memory object for PrometheusForwarderDataSource. ### [New-AzScheduledQueryRule](New-AzScheduledQueryRule.md) -Creates or updates a scheduled query rule. +Create a scheduled query rule. ### [New-AzScheduledQueryRuleConditionObject](New-AzScheduledQueryRuleConditionObject.md) Create an in-memory object for Condition. diff --git a/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md index 5fa5fe1bc24e..7c0d8964b484 100644 --- a/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md @@ -82,7 +82,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleIdentity @@ -151,7 +150,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleResource ## NOTES diff --git a/src/Monitor/Monitor/help/New-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/New-AzScheduledQueryRule.md index 27033c36e28c..cf93b0f74556 100644 --- a/src/Monitor/Monitor/help/New-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/New-AzScheduledQueryRule.md @@ -8,22 +8,37 @@ schema: 2.0.0 # New-AzScheduledQueryRule ## SYNOPSIS -Creates or updates a scheduled query rule. +Create a scheduled query rule. ## SYNTAX +### CreateExpanded (Default) ``` New-AzScheduledQueryRule -Name -ResourceGroupName [-SubscriptionId ] -Location [-ActionCustomProperty ] [-ActionGroupResourceId ] [-AutoMitigate] [-CheckWorkspaceAlertsStorageConfigured] [-CriterionAllOf ] [-Description ] - [-DisplayName ] [-Enabled] [-EvaluationFrequency ] [-Kind ] + [-DisplayName ] [-Enabled] [-EvaluationFrequency ] [-Kind ] [-MuteActionsDuration ] [-OverrideQueryTimeRange ] [-Scope ] [-Severity ] [-SkipQueryValidation] [-Tag ] [-TargetResourceType ] [-WindowSize ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` +### CreateViaJsonFilePath +``` +New-AzScheduledQueryRule -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonString +``` +New-AzScheduledQueryRule -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + ## DESCRIPTION -Creates or updates a scheduled query rule. +Create a scheduled query rule. ## EXAMPLES @@ -44,7 +59,7 @@ The properties of an alert payload. ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -59,7 +74,7 @@ Action Group resource Ids to invoke when the alert fires. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -76,7 +91,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -93,7 +108,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -105,11 +120,10 @@ Accept wildcard characters: False ### -CriterionAllOf A list of conditions to evaluate against the specified scopes -To construct, see NOTES section for CRITERIONALLOF properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.ICondition[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition[] +Parameter Sets: CreateExpanded Aliases: Required: False @@ -140,7 +154,7 @@ The description of the scheduled query rule. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -155,7 +169,7 @@ The display name of the alert rule ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -171,7 +185,7 @@ Value should be true or false ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -187,7 +201,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -197,13 +211,43 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Kind Indicates the type of scheduled query rule. The default is LogAlert. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: False @@ -218,7 +262,7 @@ The geo-location where the resource lives ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -234,7 +278,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -265,7 +309,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -296,7 +340,7 @@ The list of resource id's that this scheduled query rule is scoped to. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -314,7 +358,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -331,7 +375,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -361,7 +405,7 @@ Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -378,7 +422,7 @@ Relevant only for rules of the kind LogAlert ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -394,7 +438,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -442,7 +486,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleResource ## NOTES diff --git a/src/Monitor/Monitor/help/New-AzScheduledQueryRuleConditionObject.md b/src/Monitor/Monitor/help/New-AzScheduledQueryRuleConditionObject.md index 4e8742552725..fd7dfaa1e17a 100644 --- a/src/Monitor/Monitor/help/New-AzScheduledQueryRuleConditionObject.md +++ b/src/Monitor/Monitor/help/New-AzScheduledQueryRuleConditionObject.md @@ -1,7 +1,7 @@ --- external help file: Az.ScheduledQueryRule.psm1-help.xml Module Name: Az.Monitor -online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleConditionObject +online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-azscheduledqueryruleconditionobject schema: 2.0.0 --- @@ -15,8 +15,8 @@ Create an in-memory object for Condition. ``` New-AzScheduledQueryRuleConditionObject [-Dimension ] [-FailingPeriodMinFailingPeriodsToAlert ] [-FailingPeriodNumberOfEvaluationPeriod ] - [-MetricMeasureColumn ] [-MetricName ] [-Operator ] [-Query ] - [-ResourceIdColumn ] [-Threshold ] [-TimeAggregation ] + [-MetricMeasureColumn ] [-MetricName ] [-Operator ] [-Query ] + [-ResourceIdColumn ] [-Threshold ] [-TimeAggregation ] [] ``` @@ -37,10 +37,9 @@ Create condition object ### -Dimension List of Dimensions conditions. -To construct, see NOTES section for DIMENSION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IDimension[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension[] Parameter Sets: (All) Aliases: @@ -122,7 +121,7 @@ The criteria operator. Relevant and required only for rules of the kind LogAlert. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator +Type: System.String Parameter Sets: (All) Aliases: @@ -186,7 +185,7 @@ Aggregation type. Relevant and required only for rules of the kind LogAlert. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation +Type: System.String Parameter Sets: (All) Aliases: @@ -204,7 +203,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Condition ## NOTES diff --git a/src/Monitor/Monitor/help/New-AzScheduledQueryRuleDimensionObject.md b/src/Monitor/Monitor/help/New-AzScheduledQueryRuleDimensionObject.md index 7b1bf1ad7b9b..52e45984622f 100644 --- a/src/Monitor/Monitor/help/New-AzScheduledQueryRuleDimensionObject.md +++ b/src/Monitor/Monitor/help/New-AzScheduledQueryRuleDimensionObject.md @@ -1,7 +1,7 @@ --- external help file: Az.ScheduledQueryRule.psm1-help.xml Module Name: Az.Monitor -online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleDimensionObject +online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-azscheduledqueryruledimensionobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for Dimension. ## SYNTAX ``` -New-AzScheduledQueryRuleDimensionObject -Name -Operator -Value +New-AzScheduledQueryRuleDimensionObject -Name -Operator -Value [] ``` @@ -50,7 +50,7 @@ Accept wildcard characters: False Operator for dimension values. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator +Type: System.String Parameter Sets: (All) Aliases: @@ -83,7 +83,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Dimension +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Dimension ## NOTES diff --git a/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md index b8cddd1bd4bc..825314fadef0 100644 --- a/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md @@ -57,7 +57,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleIdentity diff --git a/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md index 88cf3e3239dd..18627b3cb4e0 100644 --- a/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md @@ -23,6 +23,20 @@ Update-AzScheduledQueryRule -Name -ResourceGroupName [-Subscri [-WhatIf] [-Confirm] [] ``` +### UpdateViaJsonString +``` +Update-AzScheduledQueryRule -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzScheduledQueryRule -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + ### UpdateViaIdentityExpanded ``` Update-AzScheduledQueryRule -InputObject [-ActionCustomProperty ] @@ -54,7 +68,7 @@ The properties of an alert payload. ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -69,7 +83,7 @@ Action Group resource Ids to invoke when the alert fires. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -86,7 +100,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -103,7 +117,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -115,11 +129,10 @@ Accept wildcard characters: False ### -CriterionAllOf A list of conditions to evaluate against the specified scopes -To construct, see NOTES section for CRITERIONALLOF properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.ICondition[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -150,7 +163,7 @@ The description of the scheduled query rule. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -165,7 +178,7 @@ The display name of the alert rule ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -181,7 +194,7 @@ Value should be true or false ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -197,7 +210,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -209,7 +222,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleIdentity @@ -223,13 +235,43 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -MuteActionsDuration Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -244,7 +286,7 @@ The name of the rule. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: Required: True @@ -260,7 +302,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -276,7 +318,7 @@ The name is case insensitive. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: Required: True @@ -291,7 +333,7 @@ The list of resource id's that this scheduled query rule is scoped to. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -309,7 +351,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -326,7 +368,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -341,7 +383,7 @@ The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: Required: False @@ -356,7 +398,7 @@ Resource tags ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -373,7 +415,7 @@ Relevant only for rules of the kind LogAlert ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -389,7 +431,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -439,7 +481,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleResource ## NOTES diff --git a/src/Monitor/MonitorWorkspace.Autorest/generate-info.json b/src/Monitor/MonitorWorkspace.Autorest/generate-info.json index 280cf6e03a9c..d4e33a056661 100644 --- a/src/Monitor/MonitorWorkspace.Autorest/generate-info.json +++ b/src/Monitor/MonitorWorkspace.Autorest/generate-info.json @@ -1,3 +1,3 @@ { "generate_Id": "907c6456-4b17-4fb5-9e9e-96e0dd8b5b95" -} +} \ No newline at end of file diff --git a/src/Monitor/ScheduledQueryRule.Autorest/Properties/AssemblyInfo.cs b/src/Monitor/ScheduledQueryRule.Autorest/Properties/AssemblyInfo.cs index 405a916b491b..83073b9b8b3b 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/Properties/AssemblyInfo.cs +++ b/src/Monitor/ScheduledQueryRule.Autorest/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ [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.Reflection.AssemblyFileVersionAttribute("6.0.3")] +[assembly: System.Reflection.AssemblyVersionAttribute("6.0.3")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] diff --git a/src/Monitor/ScheduledQueryRule.Autorest/README.md b/src/Monitor/ScheduledQueryRule.Autorest/README.md index 55f355306759..f6e2ff032870 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/README.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/README.md @@ -39,22 +39,13 @@ title: ScheduledQueryRule module-version: 0.1.0 subject-prefix: ScheduledQueryRule namespace: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule -nested-object-to-string: true - -# If there are post APIs for some kinds of actions in the RP, you may need to -# uncomment following line to support viaIdentity for these post APIs -# identity-correction-for-post: true - -# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option -use-extension: - "@autorest/powershell": "3.x" directive: # 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 - where: - variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$ remove: true - where: verb: Set @@ -84,39 +75,7 @@ directive: "format": "int64", "description": "Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert." } - # Rename 'Equals' - - 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 - - where: - verb: Get|Update|New - 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 + - model-cmdlet: + - model-name: Condition + - model-name: Dimension ``` diff --git a/src/Monitor/ScheduledQueryRule.Autorest/custom/New-AzScheduledQueryRuleConditionObject.ps1 b/src/Monitor/ScheduledQueryRule.Autorest/custom/autogen-model-cmdlets/New-AzScheduledQueryRuleConditionObject.ps1 similarity index 85% rename from src/Monitor/ScheduledQueryRule.Autorest/custom/New-AzScheduledQueryRuleConditionObject.ps1 rename to src/Monitor/ScheduledQueryRule.Autorest/custom/autogen-model-cmdlets/New-AzScheduledQueryRuleConditionObject.ps1 index cb57d7429a3c..30f4327bdf96 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/custom/New-AzScheduledQueryRuleConditionObject.ps1 +++ b/src/Monitor/ScheduledQueryRule.Autorest/custom/autogen-model-cmdlets/New-AzScheduledQueryRuleConditionObject.ps1 @@ -21,17 +21,18 @@ Create an in-memory object for Condition. Create an in-memory object for Condition. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition +Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Condition .Link -https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleConditionObject +https://learn.microsoft.com/powershell/module/Az.Monitor/new-azscheduledqueryruleconditionobject #> function New-AzScheduledQueryRuleConditionObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition')] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.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[]] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension[]] $Dimension, [Parameter(HelpMessage="The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1.")] [long] @@ -46,8 +47,8 @@ function New-AzScheduledQueryRuleConditionObject { [string] $MetricName, [Parameter(HelpMessage="The criteria operator. Relevant and required only for rules of the kind LogAlert.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator])] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.PSArgumentCompleterAttribute("Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual")] + [string] $Operator, [Parameter(HelpMessage="Log query alert.")] [string] @@ -59,13 +60,13 @@ function New-AzScheduledQueryRuleConditionObject { [double] $Threshold, [Parameter(HelpMessage="Aggregation type. Relevant and required only for rules of the kind LogAlert.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation])] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.PSArgumentCompleterAttribute("Count", "Average", "Minimum", "Maximum", "Total")] + [string] $TimeAggregation ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Condition]::New() if ($PSBoundParameters.ContainsKey('Dimension')) { $Object.Dimension = $Dimension diff --git a/src/Monitor/ScheduledQueryRule.Autorest/custom/New-AzScheduledQueryRuleDimensionObject.ps1 b/src/Monitor/ScheduledQueryRule.Autorest/custom/autogen-model-cmdlets/New-AzScheduledQueryRuleDimensionObject.ps1 similarity index 78% rename from src/Monitor/ScheduledQueryRule.Autorest/custom/New-AzScheduledQueryRuleDimensionObject.ps1 rename to src/Monitor/ScheduledQueryRule.Autorest/custom/autogen-model-cmdlets/New-AzScheduledQueryRuleDimensionObject.ps1 index 2721bc4b1cf7..def3000b8e1c 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/custom/New-AzScheduledQueryRuleDimensionObject.ps1 +++ b/src/Monitor/ScheduledQueryRule.Autorest/custom/autogen-model-cmdlets/New-AzScheduledQueryRuleDimensionObject.ps1 @@ -21,12 +21,13 @@ Create an in-memory object for Dimension. Create an in-memory object for Dimension. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Dimension +Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Dimension .Link -https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleDimensionObject +https://learn.microsoft.com/powershell/module/Az.Monitor/new-azscheduledqueryruledimensionobject #> function New-AzScheduledQueryRuleDimensionObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Dimension')] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Dimension')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -34,17 +35,16 @@ function New-AzScheduledQueryRuleDimensionObject { [string] $Name, [Parameter(Mandatory, HelpMessage="Operator for dimension values.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator])] - [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator] + [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.PSArgumentCompleterAttribute("Include", "Exclude")] + [string] $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 ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Dimension]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Dimension]::New() if ($PSBoundParameters.ContainsKey('Name')) { $Object.Name = $Name diff --git a/src/Monitor/ScheduledQueryRule.Autorest/docs/Az.ScheduledQueryRule.md b/src/Monitor/ScheduledQueryRule.Autorest/docs/Az.ScheduledQueryRule.md index b9c8e4708234..618ecafcfa30 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/docs/Az.ScheduledQueryRule.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/docs/Az.ScheduledQueryRule.md @@ -1,6 +1,6 @@ --- Module Name: Az.ScheduledQueryRule -Module Guid: 806a79ac-f0d4-4c15-92e5-3b6fc73a71cd +Module Guid: c4b4ebbe-2687-4d11-a069-46f874c1fc2c Download Help Link: https://learn.microsoft.com/powershell/module/az.scheduledqueryrule Help Version: 1.0.0.0 Locale: en-US @@ -15,7 +15,7 @@ Microsoft Azure PowerShell: ScheduledQueryRule cmdlets Retrieve an scheduled query rule definition. ### [New-AzScheduledQueryRule](New-AzScheduledQueryRule.md) -Creates or updates a scheduled query rule. +Create a scheduled query rule. ### [New-AzScheduledQueryRuleConditionObject](New-AzScheduledQueryRuleConditionObject.md) Create an in-memory object for Condition. diff --git a/src/Monitor/ScheduledQueryRule.Autorest/docs/Get-AzScheduledQueryRule.md b/src/Monitor/ScheduledQueryRule.Autorest/docs/Get-AzScheduledQueryRule.md index 5f4abf2ea49f..9cbecec242fa 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/docs/Get-AzScheduledQueryRule.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/docs/Get-AzScheduledQueryRule.md @@ -81,7 +81,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleIdentity @@ -150,7 +149,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleResource ## NOTES diff --git a/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRule.md b/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRule.md index 9978ffb29bb2..7733e8349167 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRule.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRule.md @@ -8,22 +8,35 @@ schema: 2.0.0 # New-AzScheduledQueryRule ## SYNOPSIS -Creates or updates a scheduled query rule. +Create a scheduled query rule. ## SYNTAX +### CreateExpanded (Default) ``` New-AzScheduledQueryRule -Name -ResourceGroupName -Location [-SubscriptionId ] [-ActionCustomProperty ] [-ActionGroupResourceId ] [-AutoMitigate] [-CheckWorkspaceAlertsStorageConfigured] [-CriterionAllOf ] - [-Description ] [-DisplayName ] [-Enabled] [-EvaluationFrequency ] [-Kind ] + [-Description ] [-DisplayName ] [-Enabled] [-EvaluationFrequency ] [-Kind ] [-MuteActionsDuration ] [-OverrideQueryTimeRange ] [-Scope ] [-Severity ] [-SkipQueryValidation] [-Tag ] [-TargetResourceType ] [-WindowSize ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaJsonFilePath +``` +New-AzScheduledQueryRule -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzScheduledQueryRule -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Creates or updates a scheduled query rule. +Create a scheduled query rule. ## EXAMPLES @@ -44,7 +57,7 @@ The properties of an alert payload. ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -59,7 +72,7 @@ Action Group resource Ids to invoke when the alert fires. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -76,7 +89,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -93,7 +106,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -105,11 +118,10 @@ Accept wildcard characters: False ### -CriterionAllOf A list of conditions to evaluate against the specified scopes -To construct, see NOTES section for CRITERIONALLOF properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.ICondition[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition[] +Parameter Sets: CreateExpanded Aliases: Required: False @@ -140,7 +152,7 @@ The description of the scheduled query rule. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -155,7 +167,7 @@ The display name of the alert rule ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -171,7 +183,7 @@ Value should be true or false ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -187,7 +199,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -197,13 +209,43 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Kind Indicates the type of scheduled query rule. The default is LogAlert. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: False @@ -218,7 +260,7 @@ The geo-location where the resource lives ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -234,7 +276,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -265,7 +307,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -296,7 +338,7 @@ The list of resource id's that this scheduled query rule is scoped to. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -314,7 +356,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -331,7 +373,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -361,7 +403,7 @@ Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -378,7 +420,7 @@ Relevant only for rules of the kind LogAlert ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -394,7 +436,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -442,7 +484,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleResource ## NOTES diff --git a/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleConditionObject.md b/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleConditionObject.md index 96bbdfb389fc..93630e9c24b9 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleConditionObject.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleConditionObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.Monitor -online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleConditionObject +online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-azscheduledqueryruleconditionobject schema: 2.0.0 --- @@ -15,8 +15,8 @@ Create an in-memory object for Condition. ``` New-AzScheduledQueryRuleConditionObject [-Dimension ] [-FailingPeriodMinFailingPeriodsToAlert ] [-FailingPeriodNumberOfEvaluationPeriod ] - [-MetricMeasureColumn ] [-MetricName ] [-Operator ] [-Query ] - [-ResourceIdColumn ] [-Threshold ] [-TimeAggregation ] [] + [-MetricMeasureColumn ] [-MetricName ] [-Operator ] [-Query ] + [-ResourceIdColumn ] [-Threshold ] [-TimeAggregation ] [] ``` ## DESCRIPTION @@ -36,10 +36,9 @@ Create condition object ### -Dimension List of Dimensions conditions. -To construct, see NOTES section for DIMENSION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IDimension[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension[] Parameter Sets: (All) Aliases: @@ -121,7 +120,7 @@ The criteria operator. Relevant and required only for rules of the kind LogAlert. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator +Type: System.String Parameter Sets: (All) Aliases: @@ -185,7 +184,7 @@ Aggregation type. Relevant and required only for rules of the kind LogAlert. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation +Type: System.String Parameter Sets: (All) Aliases: @@ -203,7 +202,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Condition ## NOTES diff --git a/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleDimensionObject.md b/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleDimensionObject.md index 0a94ac9942f3..98ebadaf57bb 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleDimensionObject.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/docs/New-AzScheduledQueryRuleDimensionObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.Monitor -online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleDimensionObject +online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-azscheduledqueryruledimensionobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for Dimension. ## SYNTAX ``` -New-AzScheduledQueryRuleDimensionObject -Name -Operator -Value +New-AzScheduledQueryRuleDimensionObject -Name -Operator -Value [] ``` @@ -50,7 +50,7 @@ Accept wildcard characters: False Operator for dimension values. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator +Type: System.String Parameter Sets: (All) Aliases: @@ -83,7 +83,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Dimension +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Dimension ## NOTES diff --git a/src/Monitor/ScheduledQueryRule.Autorest/docs/Remove-AzScheduledQueryRule.md b/src/Monitor/ScheduledQueryRule.Autorest/docs/Remove-AzScheduledQueryRule.md index d31f20e60b98..cc946bb5b617 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/docs/Remove-AzScheduledQueryRule.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/docs/Remove-AzScheduledQueryRule.md @@ -56,7 +56,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleIdentity diff --git a/src/Monitor/ScheduledQueryRule.Autorest/docs/Update-AzScheduledQueryRule.md b/src/Monitor/ScheduledQueryRule.Autorest/docs/Update-AzScheduledQueryRule.md index 6de3d5d704b0..480f5e3c247f 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/docs/Update-AzScheduledQueryRule.md +++ b/src/Monitor/ScheduledQueryRule.Autorest/docs/Update-AzScheduledQueryRule.md @@ -34,6 +34,18 @@ Update-AzScheduledQueryRule -InputObject [-ActionC [] ``` +### UpdateViaJsonFilePath +``` +Update-AzScheduledQueryRule -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Update-AzScheduledQueryRule -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Update a scheduled query rule. @@ -54,7 +66,7 @@ The properties of an alert payload. ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -69,7 +81,7 @@ Action Group resource Ids to invoke when the alert fires. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -86,7 +98,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -103,7 +115,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -115,11 +127,10 @@ Accept wildcard characters: False ### -CriterionAllOf A list of conditions to evaluate against the specified scopes -To construct, see NOTES section for CRITERIONALLOF properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.ICondition[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -150,7 +161,7 @@ The description of the scheduled query rule. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -165,7 +176,7 @@ The display name of the alert rule ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -181,7 +192,7 @@ Value should be true or false ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -197,7 +208,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -209,7 +220,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleIdentity @@ -223,13 +233,43 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -MuteActionsDuration Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -244,7 +284,7 @@ The name of the rule. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: True @@ -260,7 +300,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -276,7 +316,7 @@ The name is case insensitive. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: True @@ -291,7 +331,7 @@ The list of resource id's that this scheduled query rule is scoped to. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -309,7 +349,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -326,7 +366,7 @@ Relevant only for rules of the kind LogAlert. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -341,7 +381,7 @@ The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: False @@ -356,7 +396,7 @@ Resource tags ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -373,7 +413,7 @@ Relevant only for rules of the kind LogAlert ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -389,7 +429,7 @@ Relevant and required only for rules of the kind LogAlert. ```yaml Type: System.TimeSpan -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -439,7 +479,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource +### Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IScheduledQueryRuleResource ## NOTES diff --git a/src/Monitor/ScheduledQueryRule.Autorest/generate-info.json b/src/Monitor/ScheduledQueryRule.Autorest/generate-info.json index 3509c94e05e0..9979ccc2e45b 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/generate-info.json +++ b/src/Monitor/ScheduledQueryRule.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "53f643da-e033-4998-94da-05be732ad29b" + "generate_Id": "426487d3-fded-40e7-a1b9-f93765db761a" } diff --git a/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Recording.json b/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Recording.json index 158181569d60..b0fbff2790cb 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Recording.json +++ b/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Recording.json @@ -1,15 +1,15 @@ { - "ScheduledQueryRule+[NoContext]+CRUD+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Insights/scheduledQueryRules/test-rule3dq5jv?api-version=2021-08-01+1": { + "ScheduledQueryRule+[NoContext]+CRUD+$PUT+https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Insights/scheduledQueryRules/test-rule3dq5jv?api-version=2021-08-01", - "Content": "{\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 1,\r\n \"minFailingPeriodsToAlert\": 1\r\n },\r\n \"query\": \"Perf | where ObjectName == \\\"Processor\\\" and CounterName == \\\"% Processor Time\\\" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer\",\r\n \"timeAggregation\": \"Average\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": [ \"*\" ]\r\n }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 70\r\n }\r\n ]\r\n },\r\n \"displayName\": \"test-rule\",\r\n \"severity\": 4,\r\n \"scopes\": [ \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Compute/virtualMachines/test-vm5fq4nb\" ],\r\n \"evaluationFrequency\": \"PT5M\",\r\n \"windowSize\": \"PT10M\"\r\n }\r\n}", + "RequestUri": "https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01", + "Content": "{\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \"failingPeriods\": {\r\n \"numberOfEvaluationPeriods\": 1,\r\n \"minFailingPeriodsToAlert\": 1\r\n },\r\n \"query\": \"Perf | where ObjectName == \\\"Processor\\\" and CounterName == \\\"% Processor Time\\\" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer\",\r\n \"timeAggregation\": \"Average\",\r\n \"metricMeasureColumn\": \"AggregatedValue\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"Computer\",\r\n \"operator\": \"Include\",\r\n \"values\": [ \"*\" ]\r\n }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 70\r\n }\r\n ]\r\n },\r\n \"displayName\": \"test-rule\",\r\n \"severity\": 4,\r\n \"scopes\": [ \"/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Compute/virtualMachines/testvm250716\" ],\r\n \"evaluationFrequency\": \"PT5M\",\r\n \"windowSize\": \"PT10M\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1082" ] + "Content-Length": [ "1080" ] } }, "Response": { @@ -17,40 +17,46 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Set-Cookie": [ "ARRAffinity=f929b3932b0be89c8b82fb99505574adcf7a61cbba6457cb7cd10973be7d395d;Path=/;HttpOnly;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com", "ARRAffinitySameSite=f929b3932b0be89c8b82fb99505574adcf7a61cbba6457cb7cd10973be7d395d;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com" ], + "x-ms-request-id": [ "fef6c975-2c35-4250-b936-69feeaf9be2d" ], + "api-supported-versions": [ "2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview" ], "X-Rate-Limit-Limit": [ "1m" ], - "X-Rate-Limit-Remaining": [ "14" ], - "X-Rate-Limit-Reset": [ "2022-09-21T08:07:26.5863251Z" ], - "Server": [ "Kestrel" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "65f0d975-ad01-43c8-ba38-6b48d5551fe6" ], - "x-ms-correlation-request-id": [ "65f0d975-ad01-43c8-ba38-6b48d5551fe6" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220921T080639Z:65f0d975-ad01-43c8-ba38-6b48d5551fe6" ], + "X-Rate-Limit-Remaining": [ "29" ], + "X-Rate-Limit-Reset": [ "2025-07-16T08:50:49.6285544Z" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-operation-identifier": [ "tenantId=213e87ed-8e08-4eb4-a63c-c073058f7b00,objectId=5dce0ce9-f0a7-437f-aea2-760d05c62ca9/southindia/174a43be-daba-484a-83e3-9bca156b03b4" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-correlation-request-id": [ "fef6c975-2c35-4250-b936-69feeaf9be2d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20250716T084955Z:fef6c975-2c35-4250-b936-69feeaf9be2d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 21 Sep 2022 08:06:38 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 096CC420E30A43658571A592E30547A1 Ref B: MAA201060515029 Ref C: 2025-07-16T08:49:45Z" ], + "Date": [ "Wed, 16 Jul 2025 08:49:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1245" ], + "Content-Length": [ "1282" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/microsoft.insights/scheduledqueryrules/test-rule3dq5jv\",\"name\":\"test-rule3dq5jv\",\"type\":\"microsoft.insights/scheduledqueryrules\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"yabhu@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-09-21T08:06:26.4964881Z\",\"lastModifiedBy\":\"yabhu@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-09-21T08:06:26.4964881Z\"},\"properties\":{\"displayName\":\"test-rule\",\"severity\":4,\"enabled\":true,\"evaluationFrequency\":\"PT5M\",\"scopes\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Compute/virtualMachines/test-vm5fq4nb\"],\"windowSize\":\"PT10M\",\"criteria\":{\"allOf\":[{\"query\":\"Perf | where ObjectName == \\\"Processor\\\" and CounterName == \\\"% Processor Time\\\" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer\",\"timeAggregation\":\"Average\",\"metricMeasureColumn\":\"AggregatedValue\",\"dimensions\":[{\"name\":\"Computer\",\"operator\":\"Include\",\"values\":[\"*\"]}],\"operator\":\"GreaterThan\",\"threshold\":70.0,\"failingPeriods\":{\"numberOfEvaluationPeriods\":1,\"minFailingPeriodsToAlert\":1}}]}}}", + "Content": "{\"id\":\"/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/microsoft.insights/scheduledqueryrules/test-rule5gklzr\",\"name\":\"test-rule5gklzr\",\"type\":\"Microsoft.Insights/scheduledQueryRules\",\"location\":\"eastus2\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2025-07-16T08:49:48.2767226Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2025-07-16T08:49:48.2767226Z\"},\"properties\":{\"createdWithApiVersion\":\"2021-08-01\",\"displayName\":\"test-rule\",\"severity\":4,\"enabled\":true,\"evaluationFrequency\":\"PT5M\",\"scopes\":[\"/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Compute/virtualMachines/testvm250716\"],\"windowSize\":\"PT10M\",\"criteria\":{\"allOf\":[{\"query\":\"Perf | where ObjectName == \\\"Processor\\\" and CounterName == \\\"% Processor Time\\\" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer\",\"timeAggregation\":\"Average\",\"metricMeasureColumn\":\"AggregatedValue\",\"dimensions\":[{\"name\":\"Computer\",\"operator\":\"Include\",\"values\":[\"*\"]}],\"operator\":\"GreaterThan\",\"threshold\":70.0,\"failingPeriods\":{\"numberOfEvaluationPeriods\":1,\"minFailingPeriodsToAlert\":1}}]}}}", "isContentBase64": false } }, - "ScheduledQueryRule+[NoContext]+CRUD+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Insights/scheduledQueryRules/test-rule3dq5jv?api-version=2021-08-01+2": { + "ScheduledQueryRule+[NoContext]+CRUD+$GET+https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Insights/scheduledQueryRules/test-rule3dq5jv?api-version=2021-08-01", + "RequestUri": "https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "5cb5ea31-30ae-4626-a063-cc9be4dc655d" ], + "x-ms-client-request-id": [ "51deb325-e0bb-428e-8392-761a48394a54" ], "CommandName": [ "Get-AzScheduledQueryRule" ], "FullCommandName": [ "Get-AzScheduledQueryRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.6", "Az.ScheduledQueryRule/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.5.1", "Az.ScheduledQueryRule/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -61,40 +67,90 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=9f7151225e66ec8053cafe9939ba36982979d3d25ed061eb4b454eb2e8474798;Path=/;HttpOnly;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com", "ARRAffinitySameSite=9f7151225e66ec8053cafe9939ba36982979d3d25ed061eb4b454eb2e8474798;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "a310b78d-68a9-41e5-b4ae-1e5fb76bbcbe" ], + "x-ms-orig-api-version": [ "2021-08-01" ], + "api-supported-versions": [ "2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-correlation-request-id": [ "a310b78d-68a9-41e5-b4ae-1e5fb76bbcbe" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20250716T084958Z:a310b78d-68a9-41e5-b4ae-1e5fb76bbcbe" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FAB6CE893AF0435988539944AC0224DE Ref B: MAA201060515029 Ref C: 2025-07-16T08:49:55Z" ], + "Date": [ "Wed, 16 Jul 2025 08:49:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1282" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/microsoft.insights/scheduledqueryrules/test-rule5gklzr\",\"name\":\"test-rule5gklzr\",\"type\":\"Microsoft.Insights/scheduledQueryRules\",\"location\":\"eastus2\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2025-07-16T08:49:48.2767226Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2025-07-16T08:49:48.2767226Z\"},\"properties\":{\"createdWithApiVersion\":\"2021-08-01\",\"displayName\":\"test-rule\",\"severity\":4,\"enabled\":true,\"evaluationFrequency\":\"PT5M\",\"scopes\":[\"/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Compute/virtualMachines/testvm250716\"],\"windowSize\":\"PT10M\",\"criteria\":{\"allOf\":[{\"query\":\"Perf | where ObjectName == \\\"Processor\\\" and CounterName == \\\"% Processor Time\\\" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer\",\"timeAggregation\":\"Average\",\"metricMeasureColumn\":\"AggregatedValue\",\"dimensions\":[{\"name\":\"Computer\",\"operator\":\"Include\",\"values\":[\"*\"]}],\"operator\":\"GreaterThan\",\"threshold\":70.0,\"failingPeriods\":{\"numberOfEvaluationPeriods\":1,\"minFailingPeriodsToAlert\":1}}]}}}", + "isContentBase64": false + } + }, + "ScheduledQueryRule+[NoContext]+CRUD+$PATCH+https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01+3": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01", + "Content": "{\r\n \"properties\": {\r\n \"description\": \"Updated description\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "70" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=868db824452979a2f0e9fc65f4e4a7c1b3faaeb156895ba3525dfba9042ab533;Path=/;HttpOnly;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com", "ARRAffinitySameSite=868db824452979a2f0e9fc65f4e4a7c1b3faaeb156895ba3525dfba9042ab533;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com" ], + "x-ms-operation-identifier": [ "tenantId=213e87ed-8e08-4eb4-a63c-c073058f7b00,objectId=5dce0ce9-f0a7-437f-aea2-760d05c62ca9/southindia/45c2fb1c-3298-45d6-986d-f1b0f1b9f2b0" ], + "x-ms-request-id": [ "2fdf2fbb-c90e-48aa-b1a4-dd3d3e901643" ], + "api-supported-versions": [ "2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview" ], "X-Rate-Limit-Limit": [ "1m" ], - "X-Rate-Limit-Remaining": [ "49" ], - "X-Rate-Limit-Reset": [ "2022-09-21T08:07:39.8363171Z" ], - "Server": [ "Kestrel" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "559cc5ff-78d9-4bda-bb44-05624995d5cd" ], - "x-ms-correlation-request-id": [ "559cc5ff-78d9-4bda-bb44-05624995d5cd" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220921T080640Z:559cc5ff-78d9-4bda-bb44-05624995d5cd" ], + "X-Rate-Limit-Remaining": [ "29" ], + "X-Rate-Limit-Reset": [ "2025-07-16T08:51:00.9263377Z" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-correlation-request-id": [ "2fdf2fbb-c90e-48aa-b1a4-dd3d3e901643" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20250716T085006Z:2fdf2fbb-c90e-48aa-b1a4-dd3d3e901643" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 21 Sep 2022 08:06:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7098BA1693BC4FB2ADA3D243ED80C585 Ref B: MAA201060515029 Ref C: 2025-07-16T08:49:58Z" ], + "Date": [ "Wed, 16 Jul 2025 08:50:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1245" ], + "Content-Length": [ "1317" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/microsoft.insights/scheduledqueryrules/test-rule3dq5jv\",\"name\":\"test-rule3dq5jv\",\"type\":\"microsoft.insights/scheduledqueryrules\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"yabhu@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-09-21T08:06:26.4964881Z\",\"lastModifiedBy\":\"yabhu@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-09-21T08:06:26.4964881Z\"},\"properties\":{\"displayName\":\"test-rule\",\"severity\":4,\"enabled\":true,\"evaluationFrequency\":\"PT5M\",\"scopes\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Compute/virtualMachines/test-vm5fq4nb\"],\"windowSize\":\"PT10M\",\"criteria\":{\"allOf\":[{\"query\":\"Perf | where ObjectName == \\\"Processor\\\" and CounterName == \\\"% Processor Time\\\" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer\",\"timeAggregation\":\"Average\",\"metricMeasureColumn\":\"AggregatedValue\",\"dimensions\":[{\"name\":\"Computer\",\"operator\":\"Include\",\"values\":[\"*\"]}],\"operator\":\"GreaterThan\",\"threshold\":70.0,\"failingPeriods\":{\"numberOfEvaluationPeriods\":1,\"minFailingPeriodsToAlert\":1}}]}}}", + "Content": "{\"id\":\"/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/microsoft.insights/scheduledqueryrules/test-rule5gklzr\",\"name\":\"test-rule5gklzr\",\"type\":\"Microsoft.Insights/scheduledQueryRules\",\"location\":\"eastus2\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2025-07-16T08:49:48.2767226Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2025-07-16T08:49:59.727038Z\"},\"properties\":{\"createdWithApiVersion\":\"2021-08-01\",\"displayName\":\"test-rule\",\"description\":\"Updated description\",\"severity\":4,\"enabled\":true,\"evaluationFrequency\":\"PT5M\",\"scopes\":[\"/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Compute/virtualMachines/testvm250716\"],\"windowSize\":\"PT10M\",\"criteria\":{\"allOf\":[{\"query\":\"Perf | where ObjectName == \\\"Processor\\\" and CounterName == \\\"% Processor Time\\\" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer\",\"timeAggregation\":\"Average\",\"metricMeasureColumn\":\"AggregatedValue\",\"dimensions\":[{\"name\":\"Computer\",\"operator\":\"Include\",\"values\":[\"*\"]}],\"operator\":\"GreaterThan\",\"threshold\":70.0,\"failingPeriods\":{\"numberOfEvaluationPeriods\":1,\"minFailingPeriodsToAlert\":1}}]}}}", "isContentBase64": false } }, - "ScheduledQueryRule+[NoContext]+CRUD+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Insights/scheduledQueryRules/test-rule3dq5jv?api-version=2021-08-01+3": { + "ScheduledQueryRule+[NoContext]+CRUD+$DELETE+https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01+4": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Insights/scheduledQueryRules/test-rule3dq5jv?api-version=2021-08-01", + "RequestUri": "https://management.azure.com/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Insights/scheduledQueryRules/test-rule5gklzr?api-version=2021-08-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "57f3e242-d9f0-4b3b-9c29-96a4ce9a60b3" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "264b5c7f-17d9-44f0-a953-b884924a785c" ], "CommandName": [ "Remove-AzScheduledQueryRule" ], "FullCommandName": [ "Remove-AzScheduledQueryRule_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.6", "Az.ScheduledQueryRule/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.5.1", "Az.ScheduledQueryRule/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -105,14 +161,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Server": [ "Kestrel" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "be924b92-9336-4a22-a054-3f2d35670c4e" ], - "x-ms-correlation-request-id": [ "be924b92-9336-4a22-a054-3f2d35670c4e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220921T080647Z:be924b92-9336-4a22-a054-3f2d35670c4e" ], + "Set-Cookie": [ "ARRAffinity=9f7151225e66ec8053cafe9939ba36982979d3d25ed061eb4b454eb2e8474798;Path=/;HttpOnly;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com", "ARRAffinitySameSite=9f7151225e66ec8053cafe9939ba36982979d3d25ed061eb4b454eb2e8474798;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus2.prod.alertsrp.azure.com" ], + "x-ms-request-id": [ "49fdf6bc-15ab-4540-9058-8109caae07a4" ], + "api-supported-versions": [ "2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-operation-identifier": [ "tenantId=213e87ed-8e08-4eb4-a63c-c073058f7b00,objectId=5dce0ce9-f0a7-437f-aea2-760d05c62ca9/southindia/afe47f91-4a76-4b4f-8d0f-30243a5aba51" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "199" ], + "x-ms-ratelimit-remaining-subscription-global-deletes": [ "2999" ], + "x-ms-correlation-request-id": [ "49fdf6bc-15ab-4540-9058-8109caae07a4" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20250716T085010Z:49fdf6bc-15ab-4540-9058-8109caae07a4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 21 Sep 2022 08:06:46 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 08B9675F05DE4703AD107EC450ACEDF6 Ref B: MAA201060515029 Ref C: 2025-07-16T08:50:06Z" ], + "Date": [ "Wed, 16 Jul 2025 08:50:09 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], diff --git a/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Tests.ps1 b/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Tests.ps1 index c935eaa68e13..7f26a1829af7 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Tests.ps1 +++ b/src/Monitor/ScheduledQueryRule.Autorest/test/ScheduledQueryRule.Tests.ps1 @@ -18,9 +18,13 @@ Describe 'ScheduledQueryRule' { It 'CRUD' { $dimension = New-AzScheduledQueryRuleDimensionObject -Name Computer -Operator Include -Value * $condition=New-AzScheduledQueryRuleConditionObject -Dimension $dimension -Query "Perf | where ObjectName == `"Processor`" and CounterName == `"% Processor Time`" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 5m), Computer" -TimeAggregation "Average" -MetricMeasureColumn "AggregatedValue" -Operator "GreaterThan" -Threshold "70" -FailingPeriodNumberOfEvaluationPeriod 1 -FailingPeriodMinFailingPeriodsToAlert 1 - New-AzScheduledQueryRule -Name $env.scheduledQueryRuleName -ResourceGroupName $env.resourceGroupName -Location eastus -DisplayName test-rule -Scope $env.vmId -Severity 4 -WindowSize ([System.TimeSpan]::New(0,10,0)) -EvaluationFrequency ([System.TimeSpan]::New(0,5,0)) -CriterionAllOf $condition + New-AzScheduledQueryRule -Name $env.scheduledQueryRuleName -ResourceGroupName $env.resourceGroupName -Location $env.location -DisplayName test-rule -Scope $env.vmId -Severity 4 -WindowSize ([System.TimeSpan]::New(0,10,0)) -EvaluationFrequency ([System.TimeSpan]::New(0,5,0)) -CriterionAllOf $condition $rule = Get-AzScheduledQueryRule -Name $env.scheduledQueryRuleName -ResourceGroupName $env.resourceGroupName + $rule.Name | Should -Be $env.scheduledQueryRuleName + $update = Update-AzScheduledQueryRule -Name $env.scheduledQueryRuleName -ResourceGroupName $env.resourceGroupName -Description "Updated description" + $update.Description | Should -Be "Updated description" + Remove-AzScheduledQueryRule -Name $env.scheduledQueryRuleName -ResourceGroupName $env.resourceGroupName } } \ No newline at end of file diff --git a/src/Monitor/ScheduledQueryRule.Autorest/test/env.json b/src/Monitor/ScheduledQueryRule.Autorest/test/env.json index 31f2077b18a3..c65f0f91fe82 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/test/env.json +++ b/src/Monitor/ScheduledQueryRule.Autorest/test/env.json @@ -1,8 +1,9 @@ { - "vmName": "test-vm5fq4nb", - "vmId": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/scheduled-query-rule-groupwgnbyd/providers/Microsoft.Compute/virtualMachines/test-vm5fq4nb", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", - "scheduledQueryRuleName": "test-rule3dq5jv", - "resourceGroupName": "scheduled-query-rule-groupwgnbyd" + "resourceGroupName": "scheduled-query-rule-group0716", + "vmId": "/subscriptions/0e745469-49f8-48c9-873b-24ca87143db1/resourceGroups/scheduled-query-rule-group0716/providers/Microsoft.Compute/virtualMachines/testvm250716", + "location": "eastus2", + "vmName": "testvm250716", + "SubscriptionId": "0e745469-49f8-48c9-873b-24ca87143db1", + "Tenant": "213e87ed-8e08-4eb4-a63c-c073058f7b00", + "scheduledQueryRuleName": "test-rule5gklzr" } diff --git a/src/Monitor/ScheduledQueryRule.Autorest/test/utils.ps1 b/src/Monitor/ScheduledQueryRule.Autorest/test/utils.ps1 index bebc0c8e3b37..17facfcd9814 100644 --- a/src/Monitor/ScheduledQueryRule.Autorest/test/utils.ps1 +++ b/src/Monitor/ScheduledQueryRule.Autorest/test/utils.ps1 @@ -45,18 +45,31 @@ function setupEnv() { $env.Tenant = (Get-AzContext).Tenant.Id # For any resources you created for test, you should add it to $env here. - $resourceGroupName = 'scheduled-query-rule-group' + (RandomString -allChars $false -len 6) - write-host "start to create test group $resourceGroupName" - New-AzResourceGroup -Name $resourceGroupName -Location eastus + # $resourceGroupName = 'scheduled-query-rule-group' + (RandomString -allChars $false -len 6) + $resourceGroupName = 'scheduled-query-rule-group0716' + $location = 'eastus2' + try { + Get-AzResourceGroup -Name $resourceGroupName -ErrorAction Stop + Write-Host 'Get created group' + } catch { + write-host "start to create test group $resourceGroupName" + New-AzResourceGroup -Name $resourceGroupName -Location $location + } $null = $env.Add("resourceGroupName", $resourceGroupName) + $null = $env.Add("location", $location) - $vmName = 'test-vm' + (RandomString -allChars $false -len 6) - $vmPassword = ConvertTo-SecureString "Testpassword001!" -AsPlainText -Force - $vmCred = New-Object System.Management.Automation.PSCredential('USERNAME', $vmPassword) - write-host "start to create vm $vmName" - New-AzVM -Credential $vmCred -Name $vmName -ResourceGroup $resourceGroupName + # $vmName = 'testvm' + (RandomString -allChars $false -len 6) + # $vmPassword = 'REDACTED' + # $vmCred = New-Object System.Management.Automation.PSCredential('USERNAME', $vmPassword) + # write-host "start to create vm $vmName" + # New-AzVM -Credential $vmCred -Name $vmName -ResourceGroup $resourceGroupName + $vmName = 'testvm250716' $null = $env.Add("vmName", $vmName) $vmId = (Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmName).Id + if($null -eq $vmId) + { + Write-Host "Failed to get the required virtual machine." + } $null = $env.Add("vmId", $vmId) $scheduledQueryRuleName = 'test-rule' + (RandomString -allChars $false -len 6) diff --git a/tools/StaticAnalysis/Exceptions/Az.Monitor/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Monitor/BreakingChangeIssues.csv new file mode 100644 index 000000000000..9d60ffee87a9 --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.Monitor/BreakingChangeIssues.csv @@ -0,0 +1,37 @@ +"Module","ClassName","Target","Severity","ProblemId","Description","Remediation" +"Az.Monitor","Get-AzScheduledQueryRule","Get-AzScheduledQueryRule","0","3000","The type of property 'CriterionAllOf' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition]'.","Change the type of property 'CriterionAllOf' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition'." +"Az.Monitor","Get-AzScheduledQueryRule","Get-AzScheduledQueryRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]'." +"Az.Monitor","Get-AzScheduledQueryRule","Get-AzScheduledQueryRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]'." +"Az.Monitor","Get-AzScheduledQueryRule","Get-AzScheduledQueryRule","0","3000","The type of property 'Kind' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind]' to 'System.String'.","Change the type of property 'Kind' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind]'." +"Az.Monitor","Get-AzScheduledQueryRule","Get-AzScheduledQueryRule","0","3000","The type of property 'Scope' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Scope' back to 'System.String[]'." +"Az.Monitor","Get-AzScheduledQueryRule","Get-AzScheduledQueryRule","0","3000","The type of property 'TargetResourceType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'TargetResourceType' back to 'System.String[]'." +"Az.Monitor","Get-AzScheduledQueryRule","Get-AzScheduledQueryRule","0","3000","The type of property 'ActionGroup' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'ActionGroup' back to 'System.String[]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'CriterionAllOf' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition]'.","Change the type of property 'CriterionAllOf' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'Kind' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind]' to 'System.String'.","Change the type of property 'Kind' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'Scope' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Scope' back to 'System.String[]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'TargetResourceType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'TargetResourceType' back to 'System.String[]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'ActionGroup' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'ActionGroup' back to 'System.String[]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'Dimension' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.ICondition' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension]'.","Change the type of property 'Dimension' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'Operator' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.ICondition' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator]' to 'System.String'.","Change the type of property 'Operator' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","3000","The type of property 'TimeAggregation' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.ICondition' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation]' to 'System.String'.","Change the type of property 'TimeAggregation' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation]'." +"Az.Monitor","New-AzScheduledQueryRule","New-AzScheduledQueryRule","0","2020","The cmdlet 'New-AzScheduledQueryRule' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind' for parameter 'Kind'.","Change the type for parameter 'Kind' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind'." +"Az.Monitor","New-AzScheduledQueryRuleConditionObject","New-AzScheduledQueryRuleConditionObject","0","3000","The type of property 'Dimension' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension]'.","Change the type of property 'Dimension' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.IDimension'." +"Az.Monitor","New-AzScheduledQueryRuleConditionObject","New-AzScheduledQueryRuleConditionObject","0","3000","The type of property 'Operator' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator]' to 'System.String'.","Change the type of property 'Operator' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator]'." +"Az.Monitor","New-AzScheduledQueryRuleConditionObject","New-AzScheduledQueryRuleConditionObject","0","3000","The type of property 'TimeAggregation' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Condition' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation]' to 'System.String'.","Change the type of property 'TimeAggregation' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation]'." +"Az.Monitor","New-AzScheduledQueryRuleConditionObject","New-AzScheduledQueryRuleConditionObject","0","3000","The type of property 'Operator' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IDimension' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator' to 'System.String'.","Change the type of property 'Operator' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator'." +"Az.Monitor","New-AzScheduledQueryRuleConditionObject","New-AzScheduledQueryRuleConditionObject","0","3000","The type of property 'Value' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IDimension' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Value' back to 'System.String[]'." +"Az.Monitor","New-AzScheduledQueryRuleConditionObject","New-AzScheduledQueryRuleConditionObject","0","2020","The cmdlet 'New-AzScheduledQueryRuleConditionObject' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator' for parameter 'Operator'.","Change the type for parameter 'Operator' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.ConditionOperator'." +"Az.Monitor","New-AzScheduledQueryRuleConditionObject","New-AzScheduledQueryRuleConditionObject","0","2020","The cmdlet 'New-AzScheduledQueryRuleConditionObject' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation' for parameter 'TimeAggregation'.","Change the type for parameter 'TimeAggregation' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.TimeAggregation'." +"Az.Monitor","New-AzScheduledQueryRuleDimensionObject","New-AzScheduledQueryRuleDimensionObject","0","3000","The type of property 'Operator' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Dimension' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator' to 'System.String'.","Change the type of property 'Operator' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator'." +"Az.Monitor","New-AzScheduledQueryRuleDimensionObject","New-AzScheduledQueryRuleDimensionObject","0","3000","The type of property 'Value' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.Dimension' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Value' back to 'System.String[]'." +"Az.Monitor","New-AzScheduledQueryRuleDimensionObject","New-AzScheduledQueryRuleDimensionObject","0","2020","The cmdlet 'New-AzScheduledQueryRuleDimensionObject' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator' for parameter 'Operator'.","Change the type for parameter 'Operator' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.DimensionOperator'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","3000","The type of property 'CriterionAllOf' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition]'.","Change the type of property 'CriterionAllOf' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.ICondition'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.CreatedByType]'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","3000","The type of property 'Kind' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind]' to 'System.String'.","Change the type of property 'Kind' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Support.Kind]'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","3000","The type of property 'Scope' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Scope' back to 'System.String[]'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","3000","The type of property 'TargetResourceType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'TargetResourceType' back to 'System.String[]'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","3000","The type of property 'ActionGroup' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.ScheduledQueryRule.Models.Api20210801.IScheduledQueryRuleResource' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'ActionGroup' back to 'System.String[]'." +"Az.Monitor","Update-AzScheduledQueryRule","Update-AzScheduledQueryRule","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Update-AzScheduledQueryRule' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Update-AzScheduledQueryRule'." \ No newline at end of file