Skip to content

Commit 9f28960

Browse files
[Monitor] Apply subject prefix for ActivityLogAlert and DiagnosticSetting (#19255)
* Move Monitor to Az.Monitor-preview * apply subject prefix to activitylogalert and diagnosticsetting * fix examples and suppress signature issues Co-authored-by: azure-powershell-bot <[email protected]>
1 parent 81cda1a commit 9f28960

File tree

105 files changed

+516
-719
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+516
-719
lines changed

src/Monitor/ActivityLogAlert.Autorest/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ input-file:
3939
root-module-name: $(prefix).Monitor
4040
title: ActivityLogAlert
4141
module-version: 0.1.0
42-
subject-prefix: ""
42+
subject-prefix: ActivityLogAlert
4343
namespace: Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert
4444
resourcegroup-append: true
4545
nested-object-to-string: true
@@ -77,6 +77,10 @@ directive:
7777
parameter-name: ActionGroup
7878
set:
7979
parameter-name: Action
80+
- where:
81+
subject: (ActivityLogAlert)(.*)
82+
set:
83+
subject-prefix: ""
8084

8185
- model-cmdlet:
8286
- AlertRuleAnyOfOrLeafCondition

src/Monitor/ActivityLogAlert.Autorest/create-model-cmdlets.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function CreateModelCmdlet {
2323
}
2424

2525
$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
26-
$ModuleName = ''
26+
$ModuleName = 'ActivityLogAlert'
2727
$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
2828
$null = New-Item -ItemType Directory -Force -Path $OutputDir
2929

src/Monitor/ActivityLogAlert.Autorest/custom/autogen-model-cmdlets/New-AzActionGroupObject.ps1 renamed to src/Monitor/ActivityLogAlert.Autorest/custom/autogen-model-cmdlets/New-AzActivityLogAlertActionGroupObject.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Create an in-memory object for ActionGroup.
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.ActionGroup
2525
.Link
26-
https://docs.microsoft.com/powershell/module/az./new-AzActionGroupObject
26+
https://docs.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertActionGroupObject
2727
#>
28-
function New-AzActionGroupObject {
28+
function New-AzActivityLogAlertActionGroupObject {
2929
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.ActionGroup')]
3030
[CmdletBinding(PositionalBinding=$false)]
3131
Param(

src/Monitor/ActivityLogAlert.Autorest/custom/autogen-model-cmdlets/New-AzAlertRuleAnyOfOrLeafConditionObject.ps1 renamed to src/Monitor/ActivityLogAlert.Autorest/custom/autogen-model-cmdlets/New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Create an in-memory object for AlertRuleAnyOfOrLeafCondition.
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition
2525
.Link
26-
https://docs.microsoft.com/powershell/module/az./new-AzAlertRuleAnyOfOrLeafConditionObject
26+
https://docs.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
2727
#>
28-
function New-AzAlertRuleAnyOfOrLeafConditionObject {
28+
function New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject {
2929
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition')]
3030
[CmdletBinding(PositionalBinding=$false)]
3131
Param(

src/Monitor/ActivityLogAlert.Autorest/custom/autogen-model-cmdlets/New-AzAlertRuleLeafConditionObject.ps1 renamed to src/Monitor/ActivityLogAlert.Autorest/custom/autogen-model-cmdlets/New-AzActivityLogAlertAlertRuleLeafConditionObject.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Create an in-memory object for AlertRuleLeafCondition.
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleLeafCondition
2525
.Link
26-
https://docs.microsoft.com/powershell/module/az./new-AzAlertRuleLeafConditionObject
26+
https://docs.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleLeafConditionObject
2727
#>
28-
function New-AzAlertRuleLeafConditionObject {
28+
function New-AzActivityLogAlertAlertRuleLeafConditionObject {
2929
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleLeafCondition')]
3030
[CmdletBinding(PositionalBinding=$false)]
3131
Param(

src/Monitor/ActivityLogAlert.Autorest/docs/Az.ActivityLogAlert.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ Microsoft Azure PowerShell: ActivityLogAlert cmdlets
1414
### [Get-AzActivityLogAlert](Get-AzActivityLogAlert.md)
1515
Get an Activity Log Alert rule.
1616

17-
### [New-AzActionGroupObject](New-AzActionGroupObject.md)
18-
Create an in-memory object for ActionGroup.
19-
2017
### [New-AzActivityLogAlert](New-AzActivityLogAlert.md)
2118
Create a new Activity Log Alert rule or update an existing one.
2219

23-
### [New-AzAlertRuleAnyOfOrLeafConditionObject](New-AzAlertRuleAnyOfOrLeafConditionObject.md)
20+
### [New-AzActivityLogAlertActionGroupObject](New-AzActivityLogAlertActionGroupObject.md)
21+
Create an in-memory object for ActionGroup.
22+
23+
### [New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject](New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject.md)
2424
Create an in-memory object for AlertRuleAnyOfOrLeafCondition.
2525

26-
### [New-AzAlertRuleLeafConditionObject](New-AzAlertRuleLeafConditionObject.md)
26+
### [New-AzActivityLogAlertAlertRuleLeafConditionObject](New-AzActivityLogAlertAlertRuleLeafConditionObject.md)
2727
Create an in-memory object for AlertRuleLeafCondition.
2828

2929
### [Remove-AzActivityLogAlert](Remove-AzActivityLogAlert.md)

src/Monitor/ActivityLogAlert.Autorest/docs/New-AzActivityLogAlert.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Create a new Activity Log Alert rule or update an existing one.
2727
### Example 1: Create activity log alert
2828
```powershell
2929
$scope = "subscriptions/"+(Get-AzContext).Subscription.ID
30-
$actiongroup=New-AzActionGroupObject -Id $ActionGroupResourceId -WebhookProperty @{"sampleWebhookProperty"="SamplePropertyValue"}
31-
$condition1=New-AzAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category
32-
$condition2=New-AzAlertRuleAnyOfOrLeafConditionObject -Equal Error -Field level
30+
$actiongroup=New-AzActivityLogAlertActionGroupObject -Id $ActionGroupResourceId -WebhookProperty @{"sampleWebhookProperty"="SamplePropertyValue"}
31+
$condition1=New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category
32+
$condition2=New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Error -Field level
3333
$any1=New-AzAlertRuleLeafConditionObject -Field properties.incidentType -Equal Maintenance
3434
$any2=New-AzAlertRuleLeafConditionObject -Field properties.incidentType -Equal Incident
35-
$condition3=New-AzAlertRuleAnyOfOrLeafConditionObject -AnyOf $any1,$any2
35+
$condition3=New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -AnyOf $any1,$any2
3636
New-AzActivityLogAlert -Name $AlertName -ResourceGroupName $ResourceGroupName -Action $actiongroup -Condition @($condition1,$condition2,$condition3) -Location global -Scope $scope
3737
```
3838

src/Monitor/ActivityLogAlert.Autorest/docs/New-AzActionGroupObject.md renamed to src/Monitor/ActivityLogAlert.Autorest/docs/New-AzActivityLogAlertActionGroupObject.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
---
22
external help file:
33
Module Name: Az.Monitor
4-
online version: https://docs.microsoft.com/powershell/module/az./new-AzActionGroupObject
4+
online version: https://docs.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertActionGroupObject
55
schema: 2.0.0
66
---
77

8-
# New-AzActionGroupObject
8+
# New-AzActivityLogAlertActionGroupObject
99

1010
## SYNOPSIS
1111
Create an in-memory object for ActionGroup.
1212

1313
## SYNTAX
1414

1515
```
16-
New-AzActionGroupObject -Id <String> [-WebhookProperty <IActionGroupWebhookProperties>] [<CommonParameters>]
16+
New-AzActivityLogAlertActionGroupObject -Id <String> [-WebhookProperty <IActionGroupWebhookProperties>]
17+
[<CommonParameters>]
1718
```
1819

1920
## DESCRIPTION
@@ -23,7 +24,7 @@ Create an in-memory object for ActionGroup.
2324

2425
### Example 1: Create action group object
2526
```powershell
26-
New-AzActionGroupObject -Id $ActionGroupResourceId -WebhookProperty @{"sampleWebhookProperty"="SamplePropertyValue"}
27+
New-AzActivityLogAlertActionGroupObject -Id $ActionGroupResourceId -WebhookProperty @{"sampleWebhookProperty"="SamplePropertyValue"}
2728
```
2829

2930
Create action group object

src/Monitor/ActivityLogAlert.Autorest/docs/New-AzAlertRuleAnyOfOrLeafConditionObject.md renamed to src/Monitor/ActivityLogAlert.Autorest/docs/New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
external help file:
33
Module Name: Az.Monitor
4-
online version: https://docs.microsoft.com/powershell/module/az./new-AzAlertRuleAnyOfOrLeafConditionObject
4+
online version: https://docs.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
55
schema: 2.0.0
66
---
77

8-
# New-AzAlertRuleAnyOfOrLeafConditionObject
8+
# New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
99

1010
## SYNOPSIS
1111
Create an in-memory object for AlertRuleAnyOfOrLeafCondition.
1212

1313
## SYNTAX
1414

1515
```
16-
New-AzAlertRuleAnyOfOrLeafConditionObject [-AnyOf <IAlertRuleLeafCondition[]>] [-ContainsAny <String[]>]
17-
[-Equal <String>] [-Field <String>] [<CommonParameters>]
16+
New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject [-AnyOf <IAlertRuleLeafCondition[]>]
17+
[-ContainsAny <String[]>] [-Equal <String>] [-Field <String>] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -24,15 +24,15 @@ Create an in-memory object for AlertRuleAnyOfOrLeafCondition.
2424

2525
### Example 1: Create alert rule condition
2626
```powershell
27-
New-AzAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category
27+
New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category
2828
```
2929

3030
Create alert rule condition
3131

3232
### Example 2: Create alert rule condition with leaf condition
3333
```powershell
34-
$any=New-AzAlertRuleLeafConditionObject -Field properties.incidentType -Equal Maintenance
35-
New-AzAlertRuleAnyOfOrLeafConditionObject -AnyOf $any
34+
$any=New-AzActivityLogAlertAlertRuleLeafConditionObject -Field properties.incidentType -Equal Maintenance
35+
New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -AnyOf $any
3636
```
3737

3838
Create alert rule condition with leaf condition

src/Monitor/ActivityLogAlert.Autorest/docs/New-AzAlertRuleLeafConditionObject.md renamed to src/Monitor/ActivityLogAlert.Autorest/docs/New-AzActivityLogAlertAlertRuleLeafConditionObject.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
external help file:
33
Module Name: Az.Monitor
4-
online version: https://docs.microsoft.com/powershell/module/az./new-AzAlertRuleLeafConditionObject
4+
online version: https://docs.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleLeafConditionObject
55
schema: 2.0.0
66
---
77

8-
# New-AzAlertRuleLeafConditionObject
8+
# New-AzActivityLogAlertAlertRuleLeafConditionObject
99

1010
## SYNOPSIS
1111
Create an in-memory object for AlertRuleLeafCondition.
1212

1313
## SYNTAX
1414

1515
```
16-
New-AzAlertRuleLeafConditionObject [-ContainsAny <String[]>] [-Equal <String>] [-Field <String>]
17-
[<CommonParameters>]
16+
New-AzActivityLogAlertAlertRuleLeafConditionObject [-ContainsAny <String[]>] [-Equal <String>]
17+
[-Field <String>] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -24,7 +24,7 @@ Create an in-memory object for AlertRuleLeafCondition.
2424

2525
### Example 1: Create Alert rule leaf condition
2626
```powershell
27-
New-AzAlertRuleLeafConditionObject -Field properties.incidentType -Equal Maintenance
27+
New-AzActivityLogAlertAlertRuleLeafConditionObject -Field properties.incidentType -Equal Maintenance
2828
```
2929

3030
Create Alert rule leaf condition

0 commit comments

Comments
 (0)