Skip to content

Fixed Monitor help examples with incorrect parameter names (plural) #9133

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 2 commits into from
May 3, 2019
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
1 change: 1 addition & 0 deletions src/Monitor/Monitor/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed incorrect parameter names in help examples

## Version 1.2.0
* New cmdlets for SQR API (Scheduled Query Rule)
Expand Down
10 changes: 5 additions & 5 deletions src/Monitor/Monitor/help/Add-AzAutoscaleSetting.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: 7436F31F-9DCB-4365-BA6D-41BDB5D7FCB6
Expand Down Expand Up @@ -42,11 +42,11 @@ PS C:\>$Rule1 = New-AzAutoscaleRule -MetricName "Requests" -MetricResourceId "/s

PS C:\> $Rule2 = New-AzAutoscaleRule -MetricName "Requests" -MetricResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/mywebsite" -Operator GreaterThan -MetricStatistic Average -Threshold 10 -TimeGrain 00:01:00 -ScaleActionCooldown 00:10:00 -ScaleActionDirection Increase -ScaleActionScaleType ChangeCount -ScaleActionValue "2"

PS C:\> $Profile1 = New-AzAutoscaleProfile -DefaultCapacity "1" -MaximumCapacity "10" -MinimumCapacity "1" -StartTimeWindow 2015-03-05T14:00:00 -EndTimeWindow 2015-03-05T14:30:00 -TimeWindowTimeZone GMT -Rules $Rule1, $Rule2 -Name "adios"
PS C:\> $Profile1 = New-AzAutoscaleProfile -DefaultCapacity "1" -MaximumCapacity "10" -MinimumCapacity "1" -StartTimeWindow 2015-03-05T14:00:00 -EndTimeWindow 2015-03-05T14:30:00 -TimeWindowTimeZone GMT -Rule $Rule1, $Rule2 -Name "adios"

PS C:\> $Profile2 = New-AzAutoscaleProfile -DefaultCapacity "1" -MaximumCapacity "10" -MinimumCapacity "1" -Rules $Rule1, $Rule2 -Name "SecondProfileName" -RecurrenceFrequency Minute -ScheduleDays "1", "2", "3" -ScheduleHours 5, 10, 15 -ScheduleMinutes 15, 30, 45 -ScheduleTimeZone GMT
PS C:\> $Profile2 = New-AzAutoscaleProfile -DefaultCapacity "1" -MaximumCapacity "10" -MinimumCapacity "1" -Rule $Rule1, $Rule2 -Name "SecondProfileName" -RecurrenceFrequency Minute -ScheduleDay "1", "2", "3" -ScheduleHour 5, 10, 15 -ScheduleMinute 15, 30, 45 -ScheduleTimeZone GMT

PS C:\> Add-AzAutoscaleSetting -Location "East US" -Name "MySetting" -ResourceGroupName "Default-Web-EastUS" -TargetResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm" -AutoscaleProfiles $Profile1, $Profile2
PS C:\> Add-AzAutoscaleSetting -Location "East US" -Name "MySetting" -ResourceGroupName "Default-Web-EastUS" -TargetResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm" -AutoscaleProfile $Profile1, $Profile2
```

The first two commands use New-AzAutoscaleRule to create two Autoscale rules, $Rule1 and $Rule2.
Expand Down Expand Up @@ -221,7 +221,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
4 changes: 2 additions & 2 deletions src/Monitor/Monitor/help/Add-AzLogProfile.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: 18D5B95E-4CF1-4C79-AE8B-9F4DA49B46A9
Expand Down Expand Up @@ -176,7 +176,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
4 changes: 2 additions & 2 deletions src/Monitor/Monitor/help/Add-AzMetricAlertRule.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: A90564B5-57D7-48EB-976D-38C03D930289
Expand Down Expand Up @@ -297,7 +297,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
81 changes: 40 additions & 41 deletions src/Monitor/Monitor/help/Add-AzMetricAlertRuleV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@ Name : AlertWithDim
Type : Microsoft.Insights/metricAlerts
Location : global
Tags :

```

To create a more complex metric alert rule like the ones that involve selecting dimension values or have multiple criteria, you can use the helper cmdlets New-AzMetricAlertRuleV2DimensionSelection and New-AzMetricAlertRuleV2Criteria.

Above set of cmdlets will create a metric alert rule with dimensions.

## PARAMETERS

### -ActionGroup
The Action Group for rule

```yaml
Type: ActivityLogAlertActionGroup[]
Type: Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup[]
Parameter Sets: (All)
Aliases: Actions

Expand All @@ -174,26 +174,11 @@ Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: IAzureContextContainer
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

Expand All @@ -208,7 +193,7 @@ Accept wildcard characters: False
The description of the metric alert rule

```yaml
Type: String
Type: System.String
Parameter Sets: (All)
Aliases:

Expand All @@ -223,7 +208,7 @@ Accept wildcard characters: False
The disable rule (status) flag

```yaml
Type: SwitchParameter
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Expand All @@ -238,7 +223,7 @@ Accept wildcard characters: False
The evaluation frequency for rule

```yaml
Type: TimeSpan
Type: System.TimeSpan
Parameter Sets: (All)
Aliases: EvaluationFrequency

Expand All @@ -253,7 +238,7 @@ Accept wildcard characters: False
The name of metric alert rule

```yaml
Type: String
Type: System.String
Parameter Sets: (All)
Aliases:

Expand All @@ -268,7 +253,7 @@ Accept wildcard characters: False
The Resource Group Name

```yaml
Type: String
Type: System.String
Parameter Sets: (All)
Aliases: ResourceGroup

Expand All @@ -283,7 +268,7 @@ Accept wildcard characters: False
The severity for the metric alert rule

```yaml
Type: Int32
Type: System.Int32
Parameter Sets: (All)
Aliases:

Expand All @@ -298,7 +283,7 @@ Accept wildcard characters: False
The target resource id for rule

```yaml
Type: String
Type: System.String
Parameter Sets: CreateAlertByResourceId
Aliases:

Expand All @@ -313,7 +298,7 @@ Accept wildcard characters: False
The target resource region for rule

```yaml
Type: String
Type: System.String
Parameter Sets: CreateAlertByScopes
Aliases:

Expand All @@ -328,7 +313,7 @@ Accept wildcard characters: False
The target resource scope for rule

```yaml
Type: String[]
Type: System.String[]
Parameter Sets: CreateAlertByScopes
Aliases: Scopes

Expand All @@ -343,7 +328,7 @@ Accept wildcard characters: False
The target resource type for rule

```yaml
Type: String
Type: System.String
Parameter Sets: CreateAlertByScopes
Aliases:

Expand All @@ -354,14 +339,28 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
### -WindowSize
The window size for rule

```yaml
Type: SwitchParameter
Type: System.TimeSpan
Parameter Sets: (All)
Aliases: wi
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Expand All @@ -370,24 +369,24 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -WindowSize
The window size for rule
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: TimeSpan
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Aliases: wi

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
4 changes: 2 additions & 2 deletions src/Monitor/Monitor/help/Add-AzWebtestAlertRule.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: FBAE5F75-1E28-4F1C-A9ED-20075FFD4AC7
Expand Down Expand Up @@ -253,7 +253,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
4 changes: 2 additions & 2 deletions src/Monitor/Monitor/help/Az.Monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Gets a log profile.
Gets the metric values of a resource.

### [Get-AzMetricAlertRuleV2](Get-AzMetricAlertRuleV2.md)
Gets V2 (non-classic) metric alert rules.
Gets V2 (non-classic) metric alert rules

### [Get-AzMetricDefinition](Get-AzMetricDefinition.md)
Gets metric definitions.
Expand Down Expand Up @@ -99,7 +99,7 @@ Creates an Autoscale rule.
Creates an Autoscale webhook.

### [New-AzMetricAlertRuleV2Criteria](New-AzMetricAlertRuleV2Criteria.md)
Creates a local criteria object that can be used to create a new metric alert.
Creates a local criteria object that can be used to create a new metric alert

### [New-AzMetricAlertRuleV2DimensionSelection](New-AzMetricAlertRuleV2DimensionSelection.md)
Creates a local dimension selection object that can be used to construct a metric alert criteria.
Expand Down
6 changes: 3 additions & 3 deletions src/Monitor/Monitor/help/Disable-AzActivityLogAlert.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: B5F2388E-0136-4F8A-8577-67CE2A45671E
Expand Down Expand Up @@ -55,7 +55,7 @@ This command disables an activity log alert called alert1. For this it uses a PS

### Example 3: Disable the ActivityLogAlert using the ResourceId parameter
```
PS C:\>Find-AzResource -ResourceGroupEquals "myResourceGroup" -ResourceNameEquals "myLogAlert" | Disable-AzActivityLogAlert
PS C:\>Get-AzResource -ResourceGroupName "myResourceGroup" -Name "myLogAlert" | Disable-AzActivityLogAlert
```

This command disables the ActivityLogAlert using the ResourceId parameter from the pipe.
Expand Down Expand Up @@ -168,7 +168,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
6 changes: 3 additions & 3 deletions src/Monitor/Monitor/help/Enable-AzActivityLogAlert.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: B5F2388E-0136-4F8A-8577-67CE2A45671E
Expand Down Expand Up @@ -54,7 +54,7 @@ This command enables an activity log alert called alert1. For this it uses a PSA

### Example 3: Enable the ActivityLogAlert using the ResourceId parameter
```
PS C:\>Find-AzResource -ResourceGroupEquals "myResourceGroup" -ResourceNameEquals "myLogAlert" | Enable-AzActivityLogAlert
PS C:\>Get-AzResource -ResourceGroupName "myResourceGroup" -Name "myLogAlert" | Enable-AzActivityLogAlert
```

This command enables the ActivityLogAlert using the ResourceId parameter from the pipe.
Expand Down Expand Up @@ -167,7 +167,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
4 changes: 2 additions & 2 deletions src/Monitor/Monitor/help/Get-AzActionGroup.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: 1CA26790-C791-4BFD-B986-70F28E3B095B
Expand Down Expand Up @@ -110,7 +110,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
4 changes: 2 additions & 2 deletions src/Monitor/Monitor/help/Get-AzActivityLogAlert.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Module Name: Az.Monitor
ms.assetid: 85492E00-3776-4F20-A444-9C28CC6154B7
Expand Down Expand Up @@ -112,7 +112,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
Loading