Skip to content

Commit 4d23905

Browse files
[skip ci] Archive 1c9eb71 (#27542)
1 parent 60fa0e7 commit 4d23905

File tree

146 files changed

+8005
-2266
lines changed

Some content is hidden

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

146 files changed

+8005
-2266
lines changed

generated/AlertsManagement/PrometheusRuleGroups.Autorest/Az.PrometheusRuleGroups.format.ps1xml

Lines changed: 180 additions & 186 deletions
Large diffs are not rendered by default.

generated/AlertsManagement/PrometheusRuleGroups.Autorest/Az.PrometheusRuleGroups.psd1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.PrometheusRuleGroups.private.dll'
1313
FormatsToProcess = './Az.PrometheusRuleGroups.format.ps1xml'
14-
FunctionsToExport = 'Get-AzPrometheusRuleGroup', 'New-AzPrometheusRuleGroup', 'New-AzPrometheusRuleGroupActionObject', 'New-AzPrometheusRuleObject', 'Remove-AzPrometheusRuleGroup', 'Update-AzPrometheusRuleGroup', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzPrometheusRuleGroup', 'New-AzPrometheusRuleGroup', 'New-AzPrometheusRuleGroupActionObject', 'New-AzPrometheusRuleObject', 'Remove-AzPrometheusRuleGroup', 'Update-AzPrometheusRuleGroup'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'PrometheusRuleGroups'
Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
4-
// Licensed under the Apache License, Version 2.0 (the "License");
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
53
// you may not use this file except in compliance with the License.
64
// You may obtain a copy of the License at
75
// http://www.apache.org/licenses/LICENSE-2.0
86
// Unless required by applicable law or agreed to in writing, software
9-
// distributed under the License is distributed on an "AS IS" BASIS,
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
108
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
// See the License for the specific language governing permissions and
1210
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
1413

1514
using System;
1615
using System.Reflection;
16+
using System.Runtime.CompilerServices;
1717
using System.Runtime.InteropServices;
1818

19-
[assembly: AssemblyTitle("Microsoft Azure Powershell - PrometheusRuleGroups")]
20-
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
21-
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
22-
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
23-
24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("50298b1b-4abd-4b04-8c45-8190b093637e")]
27-
[assembly: AssemblyVersion("0.6.3")]
28-
[assembly: AssemblyFileVersion("0.6.3")]
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - PrometheusRuleGroups")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.6.3")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.6.3")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

generated/AlertsManagement/PrometheusRuleGroups.Autorest/check-dependencies.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
15+
param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
1616
$ErrorActionPreference = 'Stop'
1717

18-
if(-not $Isolated) {
18+
if(-not $NotIsolated) {
1919
Write-Host -ForegroundColor Green 'Creating isolated process...'
2020
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
21-
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
21+
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
2222
return
2323
}
2424

generated/AlertsManagement/PrometheusRuleGroups.Autorest/exports/Get-AzPrometheusRuleGroup.ps1

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Get-AzPrometheusRuleGroup
2727
.Inputs
2828
Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRuleGroupsIdentity
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.IPrometheusRuleGroupResource
30+
Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRuleGroupResource
3131
.Notes
3232
COMPLEX PARAMETER PROPERTIES
3333
@@ -42,7 +42,7 @@ INPUTOBJECT <IPrometheusRuleGroupsIdentity>: Identity Parameter
4242
https://learn.microsoft.com/powershell/module/az.alertsmanagement/get-azprometheusrulegroup
4343
#>
4444
function Get-AzPrometheusRuleGroup {
45-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.IPrometheusRuleGroupResource])]
45+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRuleGroupResource])]
4646
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
4747
param(
4848
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -72,7 +72,6 @@ param(
7272
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Path')]
7373
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRuleGroupsIdentity]
7474
# Identity Parameter
75-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7675
${InputObject},
7776

7877
[Parameter()]
@@ -131,6 +130,15 @@ begin {
131130
$PSBoundParameters['OutBuffer'] = 1
132131
}
133132
$parameterSet = $PSCmdlet.ParameterSetName
133+
134+
$testPlayback = $false
135+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
136+
137+
$context = Get-AzContext
138+
if (-not $context -and -not $testPlayback) {
139+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
140+
exit
141+
}
134142

135143
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
136144
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -155,9 +163,7 @@ begin {
155163
List = 'Az.PrometheusRuleGroups.private\Get-AzPrometheusRuleGroup_List';
156164
List1 = 'Az.PrometheusRuleGroups.private\Get-AzPrometheusRuleGroup_List1';
157165
}
158-
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
159-
$testPlayback = $false
160-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
166+
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
161167
if ($testPlayback) {
162168
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
163169
} else {
@@ -171,6 +177,9 @@ begin {
171177
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
172178
}
173179
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
180+
if ($wrappedCmd -eq $null) {
181+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
182+
}
174183
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
175184
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
176185
$steppablePipeline.Begin($PSCmdlet)

generated/AlertsManagement/PrometheusRuleGroups.Autorest/exports/New-AzPrometheusRuleGroup.ps1

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
<#
1818
.Synopsis
19-
Create or update a Prometheus rule group definition.
19+
create a Prometheus rule group definition.
2020
.Description
21-
Create or update a Prometheus rule group definition.
21+
create a Prometheus rule group definition.
2222
.Example
2323
$rule1 = New-AzPrometheusRuleObject -Record "job_type:billing_jobs_duration_seconds:99p5m"
2424
$scope = "/subscriptions/fffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/MyresourceGroup/providers/microsoft.monitor/accounts/MyAccounts"
@@ -33,15 +33,15 @@ $scope = "/subscriptions/fffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/My
3333
New-AzPrometheusRuleGroup -ResourceGroupName MyresourceGroup -RuleGroupName MyRuleGroup -Location eastus -Rule $rule1 -Scope $scope -Enabled
3434
3535
.Outputs
36-
Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.IPrometheusRuleGroupResource
36+
Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRuleGroupResource
3737
.Notes
3838
COMPLEX PARAMETER PROPERTIES
3939
4040
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
4141
4242
RULE <IPrometheusRule[]>: Defines the rules in the Prometheus rule group.
4343
Expression <String>: The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
44-
[Action <IPrometheusRuleGroupAction[]>]: Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
44+
[Action <List<IPrometheusRuleGroupAction>>]: Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
4545
[ActionGroupId <String>]: The resource id of the action group to use.
4646
[ActionProperty <IPrometheusRuleGroupActionProperties>]: The properties of an action group object.
4747
[(Any) <String>]: This indicates any property can be added to this object.
@@ -60,7 +60,7 @@ RULE <IPrometheusRule[]>: Defines the rules in the Prometheus rule group.
6060
https://learn.microsoft.com/powershell/module/az.alertsmanagement/new-azprometheusrulegroup
6161
#>
6262
function New-AzPrometheusRuleGroup {
63-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.IPrometheusRuleGroupResource])]
63+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRuleGroupResource])]
6464
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
6565
param(
6666
[Parameter(Mandatory)]
@@ -83,21 +83,20 @@ param(
8383
# The ID of the target subscription.
8484
${SubscriptionId},
8585

86-
[Parameter(Mandatory)]
86+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
8787
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
8888
[System.String]
8989
# The geo-location where the resource lives
9090
${Location},
9191

92-
[Parameter(Mandatory)]
92+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
9393
[AllowEmptyCollection()]
9494
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
95-
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.IPrometheusRule[]]
95+
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRule[]]
9696
# Defines the rules in the Prometheus rule group.
97-
# To construct, see NOTES section for RULE properties and create a hash table.
9897
${Rule},
9998

100-
[Parameter(Mandatory)]
99+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
101100
[AllowEmptyCollection()]
102101
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
103102
[System.String[]]
@@ -106,38 +105,50 @@ param(
106105
# This may change in future.
107106
${Scope},
108107

109-
[Parameter()]
108+
[Parameter(ParameterSetName='CreateExpanded')]
110109
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
111110
[System.String]
112111
# Apply rule to data from a specific cluster.
113112
${ClusterName},
114113

115-
[Parameter()]
114+
[Parameter(ParameterSetName='CreateExpanded')]
116115
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
117116
[System.String]
118117
# Rule group description.
119118
${Description},
120119

121-
[Parameter()]
120+
[Parameter(ParameterSetName='CreateExpanded')]
122121
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
123122
[System.Management.Automation.SwitchParameter]
124123
# Enable/disable rule group.
125124
${Enabled},
126125

127-
[Parameter()]
126+
[Parameter(ParameterSetName='CreateExpanded')]
128127
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
129128
[System.TimeSpan]
130129
# The interval in which to run the Prometheus rule group represented in ISO 8601 duration format.
131130
# Should be between 1 and 15 minutes
132131
${Interval},
133132

134-
[Parameter()]
133+
[Parameter(ParameterSetName='CreateExpanded')]
135134
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
136-
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api30.ITrackedResourceTags]))]
135+
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.ITrackedResourceTags]))]
137136
[System.Collections.Hashtable]
138137
# Resource tags.
139138
${Tag},
140139

140+
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
141+
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
142+
[System.String]
143+
# Path of Json file supplied to the Create operation
144+
${JsonFilePath},
145+
146+
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
147+
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
148+
[System.String]
149+
# Json string supplied to the Create operation
150+
${JsonString},
151+
141152
[Parameter()]
142153
[Alias('AzureRMContext', 'AzureCredential')]
143154
[ValidateNotNull()]
@@ -194,6 +205,15 @@ begin {
194205
$PSBoundParameters['OutBuffer'] = 1
195206
}
196207
$parameterSet = $PSCmdlet.ParameterSetName
208+
209+
$testPlayback = $false
210+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
211+
212+
$context = Get-AzContext
213+
if (-not $context -and -not $testPlayback) {
214+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
215+
exit
216+
}
197217

198218
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
199219
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -214,10 +234,10 @@ begin {
214234

215235
$mapping = @{
216236
CreateExpanded = 'Az.PrometheusRuleGroups.private\New-AzPrometheusRuleGroup_CreateExpanded';
237+
CreateViaJsonFilePath = 'Az.PrometheusRuleGroups.private\New-AzPrometheusRuleGroup_CreateViaJsonFilePath';
238+
CreateViaJsonString = 'Az.PrometheusRuleGroups.private\New-AzPrometheusRuleGroup_CreateViaJsonString';
217239
}
218-
if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
219-
$testPlayback = $false
220-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
240+
if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
221241
if ($testPlayback) {
222242
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
223243
} else {
@@ -231,6 +251,9 @@ begin {
231251
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
232252
}
233253
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
254+
if ($wrappedCmd -eq $null) {
255+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
256+
}
234257
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
235258
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
236259
$steppablePipeline.Begin($PSCmdlet)

generated/AlertsManagement/PrometheusRuleGroups.Autorest/exports/New-AzPrometheusRuleGroupActionObject.ps1

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ New-AzPrometheusRuleGroupActionObject -ActionGroupId /subscriptions/fffffffff-ff
2424
2525
2626
.Outputs
27-
Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.PrometheusRuleGroupAction
27+
Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.PrometheusRuleGroupAction
2828
.Notes
2929
COMPLEX PARAMETER PROPERTIES
3030
@@ -33,10 +33,10 @@ To create the parameters described below, construct a hash table containing the
3333
ACTIONPROPERTY <IPrometheusRuleGroupActionProperties>: The properties of an action group object.
3434
[(Any) <String>]: This indicates any property can be added to this object.
3535
.Link
36-
https://learn.microsoft.com/powershell/module/Az.AlertsManagement/new-AzPrometheusRuleGroupActionObject
36+
https://learn.microsoft.com/powershell/module/Az.AlertsManagement/new-azprometheusrulegroupactionobject
3737
#>
3838
function New-AzPrometheusRuleGroupActionObject {
39-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.PrometheusRuleGroupAction])]
39+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.PrometheusRuleGroupAction])]
4040
[CmdletBinding(PositionalBinding=$false)]
4141
param(
4242
[Parameter()]
@@ -47,9 +47,8 @@ param(
4747

4848
[Parameter()]
4949
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Category('Body')]
50-
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.Api20230301.IPrometheusRuleGroupActionProperties]
50+
[Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Models.IPrometheusRuleGroupActionProperties]
5151
# The properties of an action group object.
52-
# To construct, see NOTES section for ACTIONPROPERTY properties and create a hash table.
5352
${ActionProperty}
5453
)
5554

@@ -60,6 +59,9 @@ begin {
6059
$PSBoundParameters['OutBuffer'] = 1
6160
}
6261
$parameterSet = $PSCmdlet.ParameterSetName
62+
63+
$testPlayback = $false
64+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.PrometheusRuleGroups.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
6365

6466
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
6567
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -88,6 +90,9 @@ begin {
8890
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
8991
}
9092
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
93+
if ($wrappedCmd -eq $null) {
94+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
95+
}
9196
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
9297
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
9398
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)