Skip to content

[Monitor] Fix example for Update-AzScheduledQueryRule #21047

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertActionGroupObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertActionGroupObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleLeafConditionObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleLeafConditionObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.Autoscale/new-AzAutoscaleNotificationObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzAutoscaleNotificationObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.Autoscale/new-AzAutoscaleProfileObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzAutoscaleProfileObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.Autoscale/new-AzAutoscaleScaleRuleMetricDimensionObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzAutoscaleScaleRuleMetricDimensionObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.Autoscale/new-AzAutoscaleScaleRuleObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzAutoscaleScaleRuleObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.Autoscale/new-AzAutoscaleWebhookNotificationObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzAutoscaleWebhookNotificationObject
schema: 2.0.0
---

Expand Down
2 changes: 1 addition & 1 deletion src/Monitor/Autoscale.Autorest/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ This directory contains the documentation of the cmdlets for the `Az.Autoscale`
- Packaged: yes

## Details
The process of documentation generation loads `Az.Autoscale` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder.
The process of documentation generation loads `Az.Autoscale` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.DiagnosticSetting/new-AzDiagnosticSettingLogSettingsObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzDiagnosticSettingLogSettingsObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.DiagnosticSetting/new-AzDiagnosticSettingMetricSettingsObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzDiagnosticSettingMetricSettingsObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.DiagnosticSetting/new-AzDiagnosticSettingSubscriptionLogSettingsObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzDiagnosticSettingSubscriptionLogSettingsObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.ScheduledQueryRule/new-AzScheduledQueryRuleConditionObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleConditionObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file:
Module Name: Az.Monitor
online version: https://learn.microsoft.com/powershell/module/az.ScheduledQueryRule/new-AzScheduledQueryRuleDimensionObject
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzScheduledQueryRuleDimensionObject
schema: 2.0.0
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Update a scheduled query rule.
### Example 1: Update scheduled query rule
```powershell
$subscriptionId=(Get-AzContext).Subscription.Id
New-AzScheduledQueryRule -Name test-rule -ResourceGroupName test-group -Scope "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/Microsoft.Compute/virtualMachines/test-vm" -ActionGroupResourceId "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/microsoft.insights/actionGroups/test-action-group" -AutoMitigate:$false
Update-AzScheduledQueryRule -Name test-rule -ResourceGroupName test-group -Scope "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/Microsoft.Compute/virtualMachines/test-vm" -ActionGroupResourceId "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/microsoft.insights/actionGroups/test-action-group" -AutoMitigate:$false
```

Update scheduled query rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Update scheduled query rule
```powershell
$subscriptionId=(Get-AzContext).Subscription.Id
New-AzScheduledQueryRule -Name test-rule -ResourceGroupName test-group -Scope "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/Microsoft.Compute/virtualMachines/test-vm" -ActionGroupResourceId "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/microsoft.insights/actionGroups/test-action-group" -AutoMitigate:$false
Update-AzScheduledQueryRule -Name test-rule -ResourceGroupName test-group -Scope "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/Microsoft.Compute/virtualMachines/test-vm" -ActionGroupResourceId "/subscriptions/$subscriptionId/resourceGroups/test-group/providers/microsoft.insights/actionGroups/test-action-group" -AutoMitigate:$false
```

Update scheduled query rule