@@ -149,7 +149,6 @@ param(
149149 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Path' )]
150150 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IActionGroupIdentity ]
151151 # Identity Parameter
152- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
153152 ${InputObject} ,
154153
155154 [Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
@@ -166,7 +165,6 @@ param(
166165 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IArmRoleReceiver []]
167166 # The list of ARM role receivers that are part of this action group.
168167 # 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.
170168 ${ArmRoleReceiver} ,
171169
172170 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -175,7 +173,6 @@ param(
175173 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
176174 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IAutomationRunbookReceiver []]
177175 # 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.
179176 ${AutomationRunbookReceiver} ,
180177
181178 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -184,7 +181,6 @@ param(
184181 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
185182 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IAzureAppPushReceiver []]
186183 # 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.
188184 ${AzureAppPushReceiver} ,
189185
190186 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -193,7 +189,6 @@ param(
193189 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
194190 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IAzureFunctionReceiver []]
195191 # 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.
197192 ${AzureFunctionReceiver} ,
198193
199194 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -202,7 +197,6 @@ param(
202197 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
203198 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IEmailReceiver []]
204199 # 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.
206200 ${EmailReceiver} ,
207201
208202 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -219,7 +213,6 @@ param(
219213 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
220214 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IEventHubReceiver []]
221215 # 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.
223216 ${EventHubReceiver} ,
224217
225218 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -237,7 +230,6 @@ param(
237230 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
238231 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IItsmReceiver []]
239232 # 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.
241233 ${ItsmReceiver} ,
242234
243235 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -246,7 +238,6 @@ param(
246238 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
247239 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ILogicAppReceiver []]
248240 # 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.
250241 ${LogicAppReceiver} ,
251242
252243 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -255,7 +246,6 @@ param(
255246 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
256247 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.ISmsReceiver []]
257248 # 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.
259249 ${SmsReceiver} ,
260250
261251 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -272,7 +262,6 @@ param(
272262 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
273263 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IVoiceReceiver []]
274264 # 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.
276265 ${VoiceReceiver} ,
277266
278267 [Parameter (ParameterSetName = ' CreateExpanded' )]
@@ -281,7 +270,6 @@ param(
281270 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Category (' Body' )]
282271 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IWebhookReceiver []]
283272 # 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.
285273 ${WebhookReceiver} ,
286274
287275 [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
@@ -377,7 +365,13 @@ begin {
377365 CreateViaJsonString = ' Az.ActionGroup.private\New-AzActionGroup_CreateViaJsonString' ;
378366 }
379367 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+ }
381375 }
382376 $cmdInfo = Get-Command - Name $mapping [$parameterSet ]
383377 [Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.MessageAttributeHelper ]::ProcessCustomAttributesAtRuntime($cmdInfo , $MyInvocation , $parameterSet , $PSCmdlet )
0 commit comments