Skip to content

Commit 1b8d1a1

Browse files
[skip ci] Archive 38e31e8 (#27656)
1 parent 21aa557 commit 1b8d1a1

File tree

432 files changed

+34123
-11693
lines changed

Some content is hidden

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

432 files changed

+34123
-11693
lines changed

generated/Elastic/Elastic.Autorest/Az.Elastic.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<PsModuleName>Elastic</PsModuleName>
44
<PsRootModuleName>Elastic</PsRootModuleName>
5+
<PsModuleFolder>Elastic.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/Elastic/Elastic.Autorest/Az.Elastic.format.ps1xml

+190-202
Large diffs are not rendered by default.

generated/Elastic/Elastic.Autorest/Az.Elastic.psd1

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Elastic.private.dll'
1313
FormatsToProcess = './Az.Elastic.format.ps1xml'
14-
FunctionsToExport = 'Get-AzElasticAllTrafficFilter', 'Get-AzElasticBillingInfo', 'Get-AzElasticConnectedPartnerResource', 'Get-AzElasticDeploymentInfo', 'Get-AzElasticDetailUpgradableVersion', 'Get-AzElasticDetailVMIngestion', 'Get-AzElasticListAssociatedTrafficFilter', 'Get-AzElasticMonitor', 'Get-AzElasticMonitoredResource', 'Get-AzElasticOpenAi', 'Get-AzElasticOpenAiStatus', 'Get-AzElasticOrganizationApiKey', 'Get-AzElasticOrganizationElasticToAzureSubscriptionMapping', 'Get-AzElasticTagRule', 'Get-AzElasticVersion', 'Get-AzElasticVMHost', 'Join-AzElasticAssociateTrafficFilter', 'New-AzElasticCreateAndAssociateIPFilter', 'New-AzElasticCreateAndAssociatePlFilter', 'New-AzElasticExternalUser', 'New-AzElasticFilteringTagObject', 'New-AzElasticMonitor', 'New-AzElasticOpenAi', 'New-AzElasticTagRule', 'Remove-AzElasticDetachAndDeleteTrafficFilter', 'Remove-AzElasticMonitor', 'Remove-AzElasticOpenAi', 'Remove-AzElasticTrafficFilter', 'Update-AzElasticDetachTrafficFilter', 'Update-AzElasticExternalUser', 'Update-AzElasticMonitor', 'Update-AzElasticVMCollection', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzElasticAllTrafficFilter', 'Get-AzElasticBillingInfo', 'Get-AzElasticConnectedPartnerResource', 'Get-AzElasticDeploymentInfo', 'Get-AzElasticDetailUpgradableVersion', 'Get-AzElasticDetailVMIngestion', 'Get-AzElasticListAssociatedTrafficFilter', 'Get-AzElasticMonitor', 'Get-AzElasticMonitoredResource', 'Get-AzElasticOpenAi', 'Get-AzElasticOpenAiStatus', 'Get-AzElasticOrganizationApiKey', 'Get-AzElasticOrganizationElasticToAzureSubscriptionMapping', 'Get-AzElasticTagRule', 'Get-AzElasticVersion', 'Get-AzElasticVMHost', 'Join-AzElasticAssociateTrafficFilter', 'New-AzElasticCreateAndAssociateIPFilter', 'New-AzElasticCreateAndAssociatePlFilter', 'New-AzElasticExternalUser', 'New-AzElasticFilteringTagObject', 'New-AzElasticMonitor', 'New-AzElasticOpenAi', 'New-AzElasticTagRule', 'Remove-AzElasticDetachAndDeleteTrafficFilter', 'Remove-AzElasticMonitor', 'Remove-AzElasticOpenAi', 'Remove-AzElasticTrafficFilter', 'Update-AzElasticDetachTrafficFilter', 'Update-AzElasticExternalUser', 'Update-AzElasticMonitor', 'Update-AzElasticOpenAi', 'Update-AzElasticTagRule', 'Update-AzElasticVMCollection'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Elastic'
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 - Elastic")]
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 - Elastic")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.2.1")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
2327

24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("76a7a197-6800-4de7-ac48-0cf5466a4ace")]
27-
[assembly: AssemblyVersion("0.2.1")]
28-
[assembly: AssemblyFileVersion("0.2.1")]

generated/Elastic/Elastic.Autorest/check-dependencies.ps1

+3-3
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/Elastic/Elastic.Autorest/exports/Get-AzElasticAllTrafficFilter.ps1

+15-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Get the list of all traffic filters for the account.
2323
Get-AzElasticAllTrafficFilter -ResourceGroupName elastic-rg-3eytki -MonitorName elastic-rhqz1v
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IElasticTrafficFilter
26+
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IElasticTrafficFilterResponse
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticalltrafficfilter
2929
#>
3030
function Get-AzElasticAllTrafficFilter {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IElasticTrafficFilter])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IElasticTrafficFilterResponse])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3333
param(
3434
[Parameter(Mandatory)]
@@ -108,6 +108,15 @@ begin {
108108
$PSBoundParameters['OutBuffer'] = 1
109109
}
110110
$parameterSet = $PSCmdlet.ParameterSetName
111+
112+
$testPlayback = $false
113+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
114+
115+
$context = Get-AzContext
116+
if (-not $context -and -not $testPlayback) {
117+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
118+
exit
119+
}
111120

112121
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
113122
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -129,9 +138,7 @@ begin {
129138
$mapping = @{
130139
List = 'Az.Elastic.private\Get-AzElasticAllTrafficFilter_List';
131140
}
132-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
133-
$testPlayback = $false
134-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
141+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
135142
if ($testPlayback) {
136143
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
137144
} else {
@@ -145,6 +152,9 @@ begin {
145152
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
146153
}
147154
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
155+
if ($wrappedCmd -eq $null) {
156+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
157+
}
148158
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
149159
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
150160
$steppablePipeline.Begin($PSCmdlet)

generated/Elastic/Elastic.Autorest/exports/Get-AzElasticBillingInfo.ps1

+15-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Get-AzElasticBillingInfo -ResourceGroupName elastic-rg-3eytki -MonitorName elast
2525
.Inputs
2626
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IElasticIdentity
2727
.Outputs
28-
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IBillingInfoResponse
28+
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IBillingInfoResponse
2929
.Notes
3030
COMPLEX PARAMETER PROPERTIES
3131
@@ -42,7 +42,7 @@ INPUTOBJECT <IElasticIdentity>: Identity Parameter
4242
https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticbillinginfo
4343
#>
4444
function Get-AzElasticBillingInfo {
45-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IBillingInfoResponse])]
45+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IBillingInfoResponse])]
4646
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
4747
param(
4848
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -70,7 +70,6 @@ param(
7070
[Microsoft.Azure.PowerShell.Cmdlets.Elastic.Category('Path')]
7171
[Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IElasticIdentity]
7272
# Identity Parameter
73-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7473
${InputObject},
7574

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

133141
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
134142
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -151,9 +159,7 @@ begin {
151159
Get = 'Az.Elastic.private\Get-AzElasticBillingInfo_Get';
152160
GetViaIdentity = 'Az.Elastic.private\Get-AzElasticBillingInfo_GetViaIdentity';
153161
}
154-
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
155-
$testPlayback = $false
156-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
162+
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
157163
if ($testPlayback) {
158164
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
159165
} else {
@@ -167,6 +173,9 @@ begin {
167173
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
168174
}
169175
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
176+
if ($wrappedCmd -eq $null) {
177+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
178+
}
170179
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
171180
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
172181
$steppablePipeline.Begin($PSCmdlet)

generated/Elastic/Elastic.Autorest/exports/Get-AzElasticConnectedPartnerResource.ps1

+15-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ List of all active deployments that are associated with the marketplace subscrip
2323
Get-AzElasticConnectedPartnerResource -ResourceGroupName elastic-rg-3eytki -MonitorName elastic-rhqz1v
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IConnectedPartnerResourcesListFormat
26+
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IConnectedPartnerResourcesListFormat
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticconnectedpartnerresource
2929
#>
3030
function Get-AzElasticConnectedPartnerResource {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IConnectedPartnerResourcesListFormat])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IConnectedPartnerResourcesListFormat])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3333
param(
3434
[Parameter(Mandatory)]
@@ -108,6 +108,15 @@ begin {
108108
$PSBoundParameters['OutBuffer'] = 1
109109
}
110110
$parameterSet = $PSCmdlet.ParameterSetName
111+
112+
$testPlayback = $false
113+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
114+
115+
$context = Get-AzContext
116+
if (-not $context -and -not $testPlayback) {
117+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
118+
exit
119+
}
111120

112121
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
113122
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -129,9 +138,7 @@ begin {
129138
$mapping = @{
130139
List = 'Az.Elastic.private\Get-AzElasticConnectedPartnerResource_List';
131140
}
132-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
133-
$testPlayback = $false
134-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
141+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
135142
if ($testPlayback) {
136143
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
137144
} else {
@@ -145,6 +152,9 @@ begin {
145152
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
146153
}
147154
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
155+
if ($wrappedCmd -eq $null) {
156+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
157+
}
148158
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
149159
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
150160
$steppablePipeline.Begin($PSCmdlet)

generated/Elastic/Elastic.Autorest/exports/Get-AzElasticDeploymentInfo.ps1

+15-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Fetch information regarding Elastic cloud deployment corresponding to the Elasti
2323
Get-AzElasticDeploymentInfo -ResourceGroupName elastic-rg-3eytki -Name elastic-rhqz1v
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IDeploymentInfoResponse
26+
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IDeploymentInfoResponse
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticdeploymentinfo
2929
#>
3030
function Get-AzElasticDeploymentInfo {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.IDeploymentInfoResponse])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.IDeploymentInfoResponse])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3333
param(
3434
[Parameter(Mandatory)]
@@ -108,6 +108,15 @@ begin {
108108
$PSBoundParameters['OutBuffer'] = 1
109109
}
110110
$parameterSet = $PSCmdlet.ParameterSetName
111+
112+
$testPlayback = $false
113+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
114+
115+
$context = Get-AzContext
116+
if (-not $context -and -not $testPlayback) {
117+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
118+
exit
119+
}
111120

112121
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
113122
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -129,9 +138,7 @@ begin {
129138
$mapping = @{
130139
List = 'Az.Elastic.private\Get-AzElasticDeploymentInfo_List';
131140
}
132-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
133-
$testPlayback = $false
134-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
141+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
135142
if ($testPlayback) {
136143
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
137144
} else {
@@ -145,6 +152,9 @@ begin {
145152
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
146153
}
147154
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
155+
if ($wrappedCmd -eq $null) {
156+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
157+
}
148158
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
149159
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
150160
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)