Skip to content

Commit e08a68c

Browse files
[skip ci] Archive 67d1fa2 (Azure#27600)
1 parent 70a5b11 commit e08a68c

File tree

311 files changed

+28753
-7660
lines changed

Some content is hidden

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

311 files changed

+28753
-7660
lines changed

generated/Datadog/Datadog.Autorest/Az.Datadog.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<PsModuleName>Datadog</PsModuleName>
44
<PsRootModuleName>Datadog</PsRootModuleName>
5+
<PsModuleFolder>Datadog.Autorest</PsModuleFolder>
56
</PropertyGroup>
67

78
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
89
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
9-
1010
</Project>

generated/Datadog/Datadog.Autorest/Az.Datadog.format.ps1xml

Lines changed: 226 additions & 214 deletions
Large diffs are not rendered by default.

generated/Datadog/Datadog.Autorest/Az.Datadog.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.Datadog.private.dll'
1313
FormatsToProcess = './Az.Datadog.format.ps1xml'
14-
FunctionsToExport = 'Get-AzDatadogMarketplaceAgreement', 'Get-AzDatadogMonitor', 'Get-AzDatadogMonitorApiKey', 'Get-AzDatadogMonitorDefaultKey', 'Get-AzDatadogMonitorHost', 'Get-AzDatadogMonitorLinkedResource', 'Get-AzDatadogMonitorMonitoredResource', 'Get-AzDatadogSingleSignOnConfiguration', 'Get-AzDatadogTagRule', 'New-AzDatadogFilteringTagObject', 'New-AzDatadogMarketplaceAgreement', 'New-AzDatadogMonitor', 'New-AzDatadogSingleSignOnConfiguration', 'New-AzDatadogTagRule', 'Remove-AzDatadogMonitor', 'Set-AzDatadogMonitorDefaultKey', 'Update-AzDatadogMonitor', 'Update-AzDatadogMonitorSetPasswordLink', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzDatadogMarketplaceAgreement', 'Get-AzDatadogMonitor', 'Get-AzDatadogMonitorApiKey', 'Get-AzDatadogMonitorDefaultKey', 'Get-AzDatadogMonitorHost', 'Get-AzDatadogMonitorLinkedResource', 'Get-AzDatadogMonitorMonitoredResource', 'Get-AzDatadogSingleSignOnConfiguration', 'Get-AzDatadogTagRule', 'New-AzDatadogFilteringTagObject', 'New-AzDatadogMarketplaceAgreement', 'New-AzDatadogMonitor', 'New-AzDatadogSingleSignOnConfiguration', 'New-AzDatadogTagRule', 'Remove-AzDatadogMonitor', 'Set-AzDatadogMonitorDefaultKey', 'Update-AzDatadogMonitor', 'Update-AzDatadogMonitorSetPasswordLink', 'Update-AzDatadogSingleSignOnConfiguration', 'Update-AzDatadogTagRule'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Datadog'
Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
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 - Datadog")]
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)]
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 - Datadog")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
2327

24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("2803dd32-1677-468c-b63a-dbfbc253d002")]
27-
[assembly: AssemblyVersion("0.1.2")]
28-
[assembly: AssemblyFileVersion("0.1.2")]

generated/Datadog/Datadog.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/Datadog/Datadog.Autorest/exports/Get-AzDatadogMarketplaceAgreement.ps1

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ List Datadog marketplace agreements in the subscription.
2323
Get-AzDatadogMarketplaceAgreement
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogAgreementResource
26+
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogAgreementResource
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogmarketplaceagreement
2929
#>
3030
function Get-AzDatadogMarketplaceAgreement {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogAgreementResource])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogAgreementResource])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
3333
param(
3434
[Parameter()]
@@ -94,6 +94,15 @@ begin {
9494
$PSBoundParameters['OutBuffer'] = 1
9595
}
9696
$parameterSet = $PSCmdlet.ParameterSetName
97+
98+
$testPlayback = $false
99+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Datadog.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
100+
101+
$context = Get-AzContext
102+
if (-not $context -and -not $testPlayback) {
103+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
104+
exit
105+
}
97106

98107
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
99108
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -115,9 +124,7 @@ begin {
115124
$mapping = @{
116125
List = 'Az.Datadog.private\Get-AzDatadogMarketplaceAgreement_List';
117126
}
118-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
119-
$testPlayback = $false
120-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Datadog.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
127+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
121128
if ($testPlayback) {
122129
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
123130
} else {
@@ -131,6 +138,9 @@ begin {
131138
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
132139
}
133140
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
141+
if ($wrappedCmd -eq $null) {
142+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
143+
}
134144
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
135145
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
136146
$steppablePipeline.Begin($PSCmdlet)

generated/Datadog/Datadog.Autorest/exports/Get-AzDatadogMonitor.ps1

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Get-AzDatadogMonitor -ResourceGroupName azure-rg-Datadog -Name Datadog | Get-AzD
3131
.Inputs
3232
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogIdentity
3333
.Outputs
34-
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogMonitorResource
34+
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogMonitorResource
3535
.Notes
3636
COMPLEX PARAMETER PROPERTIES
3737
@@ -48,7 +48,7 @@ INPUTOBJECT <IDatadogIdentity>: Identity Parameter
4848
https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogmonitor
4949
#>
5050
function Get-AzDatadogMonitor {
51-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogMonitorResource])]
51+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogMonitorResource])]
5252
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
5353
param(
5454
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -79,7 +79,6 @@ param(
7979
[Microsoft.Azure.PowerShell.Cmdlets.Datadog.Category('Path')]
8080
[Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogIdentity]
8181
# Identity Parameter
82-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
8382
${InputObject},
8483

8584
[Parameter()]
@@ -138,6 +137,15 @@ begin {
138137
$PSBoundParameters['OutBuffer'] = 1
139138
}
140139
$parameterSet = $PSCmdlet.ParameterSetName
140+
141+
$testPlayback = $false
142+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Datadog.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
143+
144+
$context = Get-AzContext
145+
if (-not $context -and -not $testPlayback) {
146+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
147+
exit
148+
}
141149

142150
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
143151
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -162,9 +170,7 @@ begin {
162170
List = 'Az.Datadog.private\Get-AzDatadogMonitor_List';
163171
List1 = 'Az.Datadog.private\Get-AzDatadogMonitor_List1';
164172
}
165-
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
166-
$testPlayback = $false
167-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Datadog.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
173+
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
168174
if ($testPlayback) {
169175
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
170176
} else {
@@ -178,6 +184,9 @@ begin {
178184
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
179185
}
180186
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
187+
if ($wrappedCmd -eq $null) {
188+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
189+
}
181190
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
182191
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
183192
$steppablePipeline.Begin($PSCmdlet)

generated/Datadog/Datadog.Autorest/exports/Get-AzDatadogMonitorApiKey.ps1

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ List the api keys for a given monitor resource.
2323
Get-AzDatadogMonitorApiKey -ResourceGroupName azure-rg-Datadog -Name Datadog
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogApiKey
26+
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogApiKey
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogmonitorapikey
2929
#>
3030
function Get-AzDatadogMonitorApiKey {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogApiKey])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogApiKey])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3333
param(
3434
[Parameter(Mandatory)]
@@ -107,6 +107,15 @@ begin {
107107
$PSBoundParameters['OutBuffer'] = 1
108108
}
109109
$parameterSet = $PSCmdlet.ParameterSetName
110+
111+
$testPlayback = $false
112+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Datadog.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
113+
114+
$context = Get-AzContext
115+
if (-not $context -and -not $testPlayback) {
116+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
117+
exit
118+
}
110119

111120
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
112121
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -128,9 +137,7 @@ begin {
128137
$mapping = @{
129138
List = 'Az.Datadog.private\Get-AzDatadogMonitorApiKey_List';
130139
}
131-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
132-
$testPlayback = $false
133-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Datadog.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
140+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
134141
if ($testPlayback) {
135142
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
136143
} else {
@@ -144,6 +151,9 @@ begin {
144151
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
145152
}
146153
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
154+
if ($wrappedCmd -eq $null) {
155+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
156+
}
147157
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
148158
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
149159
$steppablePipeline.Begin($PSCmdlet)

generated/Datadog/Datadog.Autorest/exports/Get-AzDatadogMonitorDefaultKey.ps1

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Get-AzDatadogMonitor -ResourceGroupName azure-rg-Datadog -Name Datadog | Get-AzD
2727
.Inputs
2828
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogIdentity
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogApiKey
30+
Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogApiKey
3131
.Notes
3232
COMPLEX PARAMETER PROPERTIES
3333
@@ -44,7 +44,7 @@ INPUTOBJECT <IDatadogIdentity>: Identity Parameter
4444
https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogmonitordefaultkey
4545
#>
4646
function Get-AzDatadogMonitorDefaultKey {
47-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.Api20210301.IDatadogApiKey])]
47+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogApiKey])]
4848
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
4949
param(
5050
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -71,7 +71,6 @@ param(
7171
[Microsoft.Azure.PowerShell.Cmdlets.Datadog.Category('Path')]
7272
[Microsoft.Azure.PowerShell.Cmdlets.Datadog.Models.IDatadogIdentity]
7373
# Identity Parameter
74-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7574
${InputObject},
7675

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

134142
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
135143
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -152,9 +160,7 @@ begin {
152160
Get = 'Az.Datadog.private\Get-AzDatadogMonitorDefaultKey_Get';
153161
GetViaIdentity = 'Az.Datadog.private\Get-AzDatadogMonitorDefaultKey_GetViaIdentity';
154162
}
155-
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
156-
$testPlayback = $false
157-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Datadog.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
163+
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
158164
if ($testPlayback) {
159165
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
160166
} else {
@@ -168,6 +174,9 @@ begin {
168174
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
169175
}
170176
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
177+
if ($wrappedCmd -eq $null) {
178+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
179+
}
171180
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
172181
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
173182
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)