@@ -149,7 +149,6 @@ param(
149
149
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Path' )]
150
150
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IActionGroupIdentity ]
151
151
# Identity Parameter
152
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
153
152
${InputObject} ,
154
153
155
154
[Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
@@ -166,7 +165,6 @@ param(
166
165
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IArmRoleReceiver []]
167
166
# The list of ARM role receivers that are part of this action group.
168
167
# Roles are Azure RBAC roles and only built-in roles are supported.
169
- # To construct, see NOTES section for ARMROLERECEIVER properties and create a hash table.
170
168
${ArmRoleReceiver} ,
171
169
172
170
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -175,7 +173,6 @@ param(
175
173
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
176
174
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IAutomationRunbookReceiver []]
177
175
# The list of AutomationRunbook receivers that are part of this action group.
178
- # To construct, see NOTES section for AUTOMATIONRUNBOOKRECEIVER properties and create a hash table.
179
176
${AutomationRunbookReceiver} ,
180
177
181
178
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -184,7 +181,6 @@ param(
184
181
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
185
182
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IAzureAppPushReceiver []]
186
183
# The list of AzureAppPush receivers that are part of this action group.
187
- # To construct, see NOTES section for AZUREAPPPUSHRECEIVER properties and create a hash table.
188
184
${AzureAppPushReceiver} ,
189
185
190
186
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -193,7 +189,6 @@ param(
193
189
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
194
190
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IAzureFunctionReceiver []]
195
191
# The list of azure function receivers that are part of this action group.
196
- # To construct, see NOTES section for AZUREFUNCTIONRECEIVER properties and create a hash table.
197
192
${AzureFunctionReceiver} ,
198
193
199
194
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -202,7 +197,6 @@ param(
202
197
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
203
198
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IEmailReceiver []]
204
199
# The list of email receivers that are part of this action group.
205
- # To construct, see NOTES section for EMAILRECEIVER properties and create a hash table.
206
200
${EmailReceiver} ,
207
201
208
202
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -219,7 +213,6 @@ param(
219
213
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
220
214
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IEventHubReceiver []]
221
215
# The list of event hub receivers that are part of this action group.
222
- # To construct, see NOTES section for EVENTHUBRECEIVER properties and create a hash table.
223
216
${EventHubReceiver} ,
224
217
225
218
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -237,7 +230,6 @@ param(
237
230
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
238
231
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IItsmReceiver []]
239
232
# The list of ITSM receivers that are part of this action group.
240
- # To construct, see NOTES section for ITSMRECEIVER properties and create a hash table.
241
233
${ItsmReceiver} ,
242
234
243
235
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -246,7 +238,6 @@ param(
246
238
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
247
239
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ILogicAppReceiver []]
248
240
# The list of logic app receivers that are part of this action group.
249
- # To construct, see NOTES section for LOGICAPPRECEIVER properties and create a hash table.
250
241
${LogicAppReceiver} ,
251
242
252
243
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -255,7 +246,6 @@ param(
255
246
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
256
247
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ISmsReceiver []]
257
248
# The list of SMS receivers that are part of this action group.
258
- # To construct, see NOTES section for SMSRECEIVER properties and create a hash table.
259
249
${SmsReceiver} ,
260
250
261
251
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -272,7 +262,6 @@ param(
272
262
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
273
263
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IVoiceReceiver []]
274
264
# The list of voice receivers that are part of this action group.
275
- # To construct, see NOTES section for VOICERECEIVER properties and create a hash table.
276
265
${VoiceReceiver} ,
277
266
278
267
[Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -281,7 +270,6 @@ param(
281
270
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
282
271
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IWebhookReceiver []]
283
272
# The list of webhook receivers that are part of this action group.
284
- # To construct, see NOTES section for WEBHOOKRECEIVER properties and create a hash table.
285
273
${WebhookReceiver} ,
286
274
287
275
[Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
@@ -377,7 +365,13 @@ begin {
377
365
CreateViaJsonString = ' Az.ActionGroup.private\New-AzActionGroup_CreateViaJsonString' ;
378
366
}
379
367
if ((' CreateExpanded' , ' CreateViaJsonFilePath' , ' CreateViaJsonString' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
380
- $PSBoundParameters [' SubscriptionId' ] = (Get-AzContext ).Subscription.Id
368
+ $testPlayback = $false
369
+ $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
370
+ if ($testPlayback ) {
371
+ $PSBoundParameters [' SubscriptionId' ] = . (Join-Path $PSScriptRoot ' ..' ' utils' ' Get-SubscriptionIdTestSafe.ps1' )
372
+ } else {
373
+ $PSBoundParameters [' SubscriptionId' ] = (Get-AzContext ).Subscription.Id
374
+ }
381
375
}
382
376
$cmdInfo = Get-Command - Name $mapping [$parameterSet ]
383
377
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.MessageAttributeHelper ]::ProcessCustomAttributesAtRuntime($cmdInfo , $MyInvocation , $parameterSet , $PSCmdlet )
0 commit comments