From 916d704ee9cb8c75f785e8793da52aa34eb77082 Mon Sep 17 00:00:00 2001 From: Flynn Date: Wed, 1 Jun 2022 23:46:16 +0800 Subject: [PATCH 1/4] format the help markdown file of Az.AlertsManagement --- .../AlertsManagement/help/Get-AzAlertProcessingRule.md | 6 +++--- .../AlertsManagement/help/Remove-AzAlertProcessingRule.md | 2 +- .../AlertsManagement/help/Update-AzAlertProcessingRule.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AlertsManagement/AlertsManagement/help/Get-AzAlertProcessingRule.md b/src/AlertsManagement/AlertsManagement/help/Get-AzAlertProcessingRule.md index 6ddc106f1164..24839cee09f6 100644 --- a/src/AlertsManagement/AlertsManagement/help/Get-AzAlertProcessingRule.md +++ b/src/AlertsManagement/AlertsManagement/help/Get-AzAlertProcessingRule.md @@ -41,21 +41,21 @@ Get-AzAlertProcessingRule -Name -ResourceGroupName [-DefaultPr ### Example 1 ```powershell -PS C:\> Get-AzAlertProcessingRule +Get-AzAlertProcessingRule ``` List all alert processing rules configured in subscription. ### Example 2 ```powershell -PS C:\> Get-AzAlertProcessingRule -ResourceGroupName "test-rg" +Get-AzAlertProcessingRule -ResourceGroupName "test-rg" ``` List all alert processing rules configured in resource group test-rg. ### Example 3 ```powershell -PS C:\> Get-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "Test-AlertProcessing-Rule" | Format-List +Get-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "Test-AlertProcessing-Rule" | Format-List ``` Get the alert processing rule with name Test-AlertProcessing-Rule in test-rg resource group. diff --git a/src/AlertsManagement/AlertsManagement/help/Remove-AzAlertProcessingRule.md b/src/AlertsManagement/AlertsManagement/help/Remove-AzAlertProcessingRule.md index f9ecdf4cd116..535da67b3f1b 100644 --- a/src/AlertsManagement/AlertsManagement/help/Remove-AzAlertProcessingRule.md +++ b/src/AlertsManagement/AlertsManagement/help/Remove-AzAlertProcessingRule.md @@ -37,7 +37,7 @@ Remove-AzAlertProcessingRule -InputObject [-DefaultProfile Remove-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AlertProcessingRuleName" +Remove-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AlertProcessingRuleName" ``` This cmdlet deletes the alert processing rule with name AlertProcessingRuleName in resource group test-rg diff --git a/src/AlertsManagement/AlertsManagement/help/Update-AzAlertProcessingRule.md b/src/AlertsManagement/AlertsManagement/help/Update-AzAlertProcessingRule.md index f4db5a807cb2..9e93d9a05d30 100644 --- a/src/AlertsManagement/AlertsManagement/help/Update-AzAlertProcessingRule.md +++ b/src/AlertsManagement/AlertsManagement/help/Update-AzAlertProcessingRule.md @@ -37,7 +37,7 @@ Update-AzAlertProcessingRule -InputObject [-Enabled ] [-T ### Example 1 ```powershell -PS C:\> Update-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "Test-AlertProcessingRule" -Enabled "False" +Update-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "Test-AlertProcessingRule" -Enabled "False" ``` This cmdlet disables the alert processing rule. From 94757f5f67ed28476153cd0a9e23c0f2c4939d5a Mon Sep 17 00:00:00 2001 From: Flynn Date: Mon, 6 Jun 2022 17:40:48 +0800 Subject: [PATCH 2/4] Update Set-AzAlertProcessingRule --- .../AlertsManagement/help/Set-AzAlertProcessingRule.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md b/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md index 5abd742109ab..8fb234926c45 100644 --- a/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md +++ b/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md @@ -63,11 +63,10 @@ This cmdlet creates an alert processing rule that adds an action group to all al ### Example 2 ```powershell -Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupsBySeverity" -Scope "/subscriptions/MySubscriptionId" -Description "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1, -/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup2/providers/microsoft.insights/actionGroups/MyActionGroup2" -MonitorServiceCondition "Equals:Sev0,Sev1" +Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupsBySeverity" -Scope "/subscriptions/MySubscriptionId" -Description "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1,/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup2/providers/microsoft.insights/actionGroups/MyActionGroup2" ``` -This cmdlet creates a rule that adds two action groups to all Sev0 and Sev1 alerts +This cmdlet creates a rule that adds two action groups ## PARAMETERS From 2724f686f8b08ca76d2fbffc930ef30da12140b5 Mon Sep 17 00:00:00 2001 From: Ziyue Zheng Date: Mon, 6 Jun 2022 17:53:28 +0800 Subject: [PATCH 3/4] format the help markdown file of Az.AlertsManagement --- .../AlertsManagement/help/Set-AzAlertProcessingRule.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md b/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md index 8fb234926c45..bfbc038cce22 100644 --- a/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md +++ b/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md @@ -56,14 +56,14 @@ Set-AzAlertProcessingRule -InputObject [-DefaultProfile ### Example 1 ```powershell -Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupToSubscription" -Scope "/subscriptions/MySubscriptionId" -Description "Add ActionGroup1 to all alerts in the subscription" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1" +Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupToSubscription" -Scope "/subscriptions/MySubscriptionId" -Description "Add ActionGroup1 to all alerts in the subscription" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1" ``` This cmdlet creates an alert processing rule that adds an action group to all alerts in a resource group. ### Example 2 ```powershell -Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupsBySeverity" -Scope "/subscriptions/MySubscriptionId" -Description "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1,/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup2/providers/microsoft.insights/actionGroups/MyActionGroup2" +Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupsBySeverity" -Scope "/subscriptions/MySubscriptionId" -Description "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1,/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup2/providers/microsoft.insights/actionGroups/MyActionGroup2" -FilterMonitorCondition "Equals:Sev0,Sev1" ``` This cmdlet creates a rule that adds two action groups From f0fcef03c44f470f8114ac6274441d209f0c31aa Mon Sep 17 00:00:00 2001 From: Ziyue Zheng Date: Mon, 6 Jun 2022 17:54:09 +0800 Subject: [PATCH 4/4] format the help markdown file of Az.AlertsManagement --- .../AlertsManagement/help/Set-AzAlertProcessingRule.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md b/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md index bfbc038cce22..f2fda0647766 100644 --- a/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md +++ b/src/AlertsManagement/AlertsManagement/help/Set-AzAlertProcessingRule.md @@ -66,7 +66,7 @@ This cmdlet creates an alert processing rule that adds an action group to all al Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupsBySeverity" -Scope "/subscriptions/MySubscriptionId" -Description "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1,/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup2/providers/microsoft.insights/actionGroups/MyActionGroup2" -FilterMonitorCondition "Equals:Sev0,Sev1" ``` -This cmdlet creates a rule that adds two action groups +This cmdlet creates a rule that adds two action groups to all Sev0 and Sev1 alerts ## PARAMETERS