Skip to content

Commit 7946f07

Browse files
Move Monitor to release-2023-03-07 (#21073)
1 parent 28878c2 commit 7946f07

File tree

73 files changed

+125
-109
lines changed

Some content is hidden

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

73 files changed

+125
-109
lines changed

src/Monitor/ActivityLogAlert.Autorest/Az.ActivityLogAlert.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434

3535
if(-not $accountsModule) {
36-
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
36+
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
3737
} elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
3838
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3939
}

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ function CreateModelCmdlet {
2323
}
2424

2525
$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
26-
$ModuleName = 'ActivityLogAlert'
2726
$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
2827
$null = New-Item -ItemType Directory -Force -Path $OutputDir
28+
if ('Az.Monitor'.length -gt 0) {
29+
$ModuleName = 'Az.Monitor'
30+
} else {
31+
$ModuleName = 'Az.ActivityLogAlert'
32+
}
2933

3034
$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
3135
$Content = ''
@@ -64,10 +68,10 @@ function CreateModelCmdlet {
6468
$ObjectType = $Model
6569
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
6670
# remove duplicated module name
67-
if ($ObjectType.StartsWith($ModuleName)) {
71+
if ($ObjectType.StartsWith('ActivityLogAlert')) {
6872
$ModulePrefix = ''
6973
} else {
70-
$ModulePrefix = $ModuleName
74+
$ModulePrefix = 'ActivityLogAlert'
7175
}
7276
$OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
7377

@@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}.
158162
.Outputs
159163
${ObjectTypeWithNamespace}
160164
.Link
161-
https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
165+
https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
162166
#>
163167
function New-Az${ModulePrefix}${ObjectType}Object {
164168
[OutputType('${ObjectTypeWithNamespace}')]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Create an in-memory object for ActionGroup.
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.ActionGroup
2525
.Link
26-
https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertActionGroupObject
26+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertActionGroupObject
2727
#>
2828
function New-AzActivityLogAlertActionGroupObject {
2929
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.ActionGroup')]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Create an in-memory object for AlertRuleAnyOfOrLeafCondition.
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition
2525
.Link
26-
https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
26+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
2727
#>
2828
function New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject {
2929
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition')]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Create an in-memory object for AlertRuleLeafCondition.
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleLeafCondition
2525
.Link
26-
https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleLeafConditionObject
26+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleLeafConditionObject
2727
#>
2828
function New-AzActivityLogAlertAlertRuleLeafConditionObject {
2929
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleLeafCondition')]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file:
33
Module Name: Az.Monitor
4-
online version: https://learn.microsoft.com/powershell/module/az.monitor/new-azactivitylogalertactiongroupobject
4+
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertActionGroupObject
55
schema: 2.0.0
66
---
77

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file:
33
Module Name: Az.Monitor
4-
online version: https://learn.microsoft.com/powershell/module/az.monitor/new-azactivitylogalertalertruleanyoforleafconditionobject
4+
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
55
schema: 2.0.0
66
---
77

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file:
33
Module Name: Az.Monitor
4-
online version: https://learn.microsoft.com/powershell/module/az.monitor/new-azactivitylogalertalertruleleafconditionobject
4+
online version: https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleLeafConditionObject
55
schema: 2.0.0
66
---
77

src/Monitor/ActivityLogAlert.Autorest/exports/New-AzActivityLogAlertActionGroupObject.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To create the parameters described below, construct a hash table containing the
3232
WEBHOOKPROPERTY <IActionGroupWebhookProperties>: the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
3333
[(Any) <String>]: This indicates any property can be added to this object.
3434
.Link
35-
https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertActionGroupObject
35+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertActionGroupObject
3636
#>
3737
function New-AzActivityLogAlertActionGroupObject {
3838
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.ActionGroup])]

src/Monitor/ActivityLogAlert.Autorest/exports/New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ANYOF <IAlertRuleLeafCondition[]>: An Activity Log Alert rule condition that is
3737
[Equal <String>]: The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met.
3838
[Field <String>]: The name of the Activity Log event's field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'.
3939
.Link
40-
https://learn.microsoft.com/powershell/module/az.ActivityLogAlert/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
40+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject
4141
#>
4242
function New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject {
4343
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActivityLogAlert.Models.Api20201001.AlertRuleAnyOfOrLeafCondition])]

0 commit comments

Comments
 (0)