Skip to content

Commit c532191

Browse files
[skip ci] Archive 27c0fc9 (#27654)
1 parent 350192f commit c532191

File tree

219 files changed

+15607
-5102
lines changed

Some content is hidden

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

219 files changed

+15607
-5102
lines changed

generated/FluidRelay/FluidRelay.Autorest/Az.FluidRelay.csproj

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

Lines changed: 188 additions & 222 deletions
Large diffs are not rendered by default.

generated/FluidRelay/FluidRelay.Autorest/Az.FluidRelay.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.FluidRelay.private.dll'
1313
FormatsToProcess = './Az.FluidRelay.format.ps1xml'
14-
FunctionsToExport = 'Get-AzFluidRelayContainer', 'Get-AzFluidRelayServer', 'Get-AzFluidRelayServerKey', 'New-AzFluidRelayServer', 'New-AzFluidRelayServerKey', 'Remove-AzFluidRelayContainer', 'Remove-AzFluidRelayServer', 'Update-AzFluidRelayServer', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzFluidRelayContainer', 'Get-AzFluidRelayServer', 'Get-AzFluidRelayServerKey', 'New-AzFluidRelayServer', 'New-AzFluidRelayServerKey', 'Remove-AzFluidRelayContainer', 'Remove-AzFluidRelayServer', 'Update-AzFluidRelayServer'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'FluidRelay'
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 - FluidRelay")]
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("22ee4713-5cbc-4d1a-ac37-887179c62f0c")]
27-
[assembly: AssemblyVersion("0.1.2")]
28-
[assembly: AssemblyFileVersion("0.1.2")]
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 - FluidRelay")]
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)]

generated/FluidRelay/FluidRelay.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/FluidRelay/FluidRelay.Autorest/exports/Get-AzFluidRelayContainer.ps1

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,50 @@ Get-AzFluidRelayContainer -FluidRelayServerName azps-fluidrelay -ResourceGroup a
2727
.Inputs
2828
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601.IFluidRelayContainer
30+
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayContainer
3131
.Notes
3232
COMPLEX PARAMETER PROPERTIES
3333
3434
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.
3535
36+
FLUIDRELAYSERVERINPUTOBJECT <IFluidRelayIdentity>: Identity Parameter
37+
[FluidRelayContainerName <String>]: The Fluid Relay container resource name.
38+
[FluidRelayServerName <String>]: The Fluid Relay server resource name.
39+
[Id <String>]: Resource identity path
40+
[ResourceGroup <String>]: The resource group containing the resource.
41+
[SubscriptionId <String>]: The subscription id (GUID) for this resource.
42+
3643
INPUTOBJECT <IFluidRelayIdentity>: Identity Parameter
3744
[FluidRelayContainerName <String>]: The Fluid Relay container resource name.
3845
[FluidRelayServerName <String>]: The Fluid Relay server resource name.
3946
[Id <String>]: Resource identity path
4047
[ResourceGroup <String>]: The resource group containing the resource.
4148
[SubscriptionId <String>]: The subscription id (GUID) for this resource.
49+
50+
RESOURCEGROUPINPUTOBJECT <IFluidRelayIdentity>: Identity Parameter
51+
[FluidRelayContainerName <String>]: The Fluid Relay container resource name.
52+
[FluidRelayServerName <String>]: The Fluid Relay server resource name.
53+
[Id <String>]: Resource identity path
54+
[ResourceGroup <String>]: The resource group containing the resource.
55+
[SubscriptionId <String>]: The subscription id (GUID) for this resource.
4256
.Link
4357
https://learn.microsoft.com/powershell/module/az.fluidrelay/get-azfluidrelaycontainer
4458
#>
4559
function Get-AzFluidRelayContainer {
46-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601.IFluidRelayContainer])]
60+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayContainer])]
4761
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
4862
param(
4963
[Parameter(ParameterSetName='Get', Mandatory)]
64+
[Parameter(ParameterSetName='GetViaIdentityResourceGroup', Mandatory)]
5065
[Parameter(ParameterSetName='List', Mandatory)]
5166
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
5267
[System.String]
5368
# The Fluid Relay server resource name.
5469
${FluidRelayServerName},
5570

5671
[Parameter(ParameterSetName='Get', Mandatory)]
72+
[Parameter(ParameterSetName='GetViaIdentityFluidRelayServer', Mandatory)]
73+
[Parameter(ParameterSetName='GetViaIdentityResourceGroup', Mandatory)]
5774
[Alias('FluidRelayContainerName')]
5875
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
5976
[System.String]
@@ -79,9 +96,20 @@ param(
7996
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
8097
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity]
8198
# Identity Parameter
82-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
8399
${InputObject},
84100

101+
[Parameter(ParameterSetName='GetViaIdentityFluidRelayServer', Mandatory, ValueFromPipeline)]
102+
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
103+
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity]
104+
# Identity Parameter
105+
${FluidRelayServerInputObject},
106+
107+
[Parameter(ParameterSetName='GetViaIdentityResourceGroup', Mandatory, ValueFromPipeline)]
108+
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
109+
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity]
110+
# Identity Parameter
111+
${ResourceGroupInputObject},
112+
85113
[Parameter()]
86114
[Alias('AzureRMContext', 'AzureCredential')]
87115
[ValidateNotNull()]
@@ -138,6 +166,15 @@ begin {
138166
$PSBoundParameters['OutBuffer'] = 1
139167
}
140168
$parameterSet = $PSCmdlet.ParameterSetName
169+
170+
$testPlayback = $false
171+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
172+
173+
$context = Get-AzContext
174+
if (-not $context -and -not $testPlayback) {
175+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
176+
exit
177+
}
141178

142179
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
143180
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -159,11 +196,11 @@ begin {
159196
$mapping = @{
160197
Get = 'Az.FluidRelay.private\Get-AzFluidRelayContainer_Get';
161198
GetViaIdentity = 'Az.FluidRelay.private\Get-AzFluidRelayContainer_GetViaIdentity';
199+
GetViaIdentityFluidRelayServer = 'Az.FluidRelay.private\Get-AzFluidRelayContainer_GetViaIdentityFluidRelayServer';
200+
GetViaIdentityResourceGroup = 'Az.FluidRelay.private\Get-AzFluidRelayContainer_GetViaIdentityResourceGroup';
162201
List = 'Az.FluidRelay.private\Get-AzFluidRelayContainer_List';
163202
}
164-
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
165-
$testPlayback = $false
166-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
203+
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
167204
if ($testPlayback) {
168205
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
169206
} else {
@@ -177,6 +214,9 @@ begin {
177214
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
178215
}
179216
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
217+
if ($wrappedCmd -eq $null) {
218+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
219+
}
180220
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
181221
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
182222
$steppablePipeline.Begin($PSCmdlet)

generated/FluidRelay/FluidRelay.Autorest/exports/Get-AzFluidRelayServer.ps1

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Get-AzFluidRelayServer -Name azps-fluidrelay -ResourceGroup azpstest-gp
2929
.Inputs
3030
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity
3131
.Outputs
32-
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601.IFluidRelayServer
32+
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayServer
3333
.Notes
3434
COMPLEX PARAMETER PROPERTIES
3535
@@ -41,14 +41,22 @@ INPUTOBJECT <IFluidRelayIdentity>: Identity Parameter
4141
[Id <String>]: Resource identity path
4242
[ResourceGroup <String>]: The resource group containing the resource.
4343
[SubscriptionId <String>]: The subscription id (GUID) for this resource.
44+
45+
RESOURCEGROUPINPUTOBJECT <IFluidRelayIdentity>: Identity Parameter
46+
[FluidRelayContainerName <String>]: The Fluid Relay container resource name.
47+
[FluidRelayServerName <String>]: The Fluid Relay server resource name.
48+
[Id <String>]: Resource identity path
49+
[ResourceGroup <String>]: The resource group containing the resource.
50+
[SubscriptionId <String>]: The subscription id (GUID) for this resource.
4451
.Link
4552
https://learn.microsoft.com/powershell/module/az.fluidrelay/get-azfluidrelayserver
4653
#>
4754
function Get-AzFluidRelayServer {
48-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601.IFluidRelayServer])]
55+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayServer])]
4956
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
5057
param(
5158
[Parameter(ParameterSetName='Get', Mandatory)]
59+
[Parameter(ParameterSetName='GetViaIdentityResourceGroup', Mandatory)]
5260
[Alias('FluidRelayServerName')]
5361
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
5462
[System.String]
@@ -75,9 +83,14 @@ param(
7583
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
7684
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity]
7785
# Identity Parameter
78-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7986
${InputObject},
8087

88+
[Parameter(ParameterSetName='GetViaIdentityResourceGroup', Mandatory, ValueFromPipeline)]
89+
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category('Path')]
90+
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity]
91+
# Identity Parameter
92+
${ResourceGroupInputObject},
93+
8194
[Parameter()]
8295
[Alias('AzureRMContext', 'AzureCredential')]
8396
[ValidateNotNull()]
@@ -134,6 +147,15 @@ begin {
134147
$PSBoundParameters['OutBuffer'] = 1
135148
}
136149
$parameterSet = $PSCmdlet.ParameterSetName
150+
151+
$testPlayback = $false
152+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
153+
154+
$context = Get-AzContext
155+
if (-not $context -and -not $testPlayback) {
156+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
157+
exit
158+
}
137159

138160
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
139161
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -155,12 +177,11 @@ begin {
155177
$mapping = @{
156178
Get = 'Az.FluidRelay.private\Get-AzFluidRelayServer_Get';
157179
GetViaIdentity = 'Az.FluidRelay.private\Get-AzFluidRelayServer_GetViaIdentity';
180+
GetViaIdentityResourceGroup = 'Az.FluidRelay.private\Get-AzFluidRelayServer_GetViaIdentityResourceGroup';
158181
List = 'Az.FluidRelay.private\Get-AzFluidRelayServer_List';
159182
List1 = 'Az.FluidRelay.private\Get-AzFluidRelayServer_List1';
160183
}
161-
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
162-
$testPlayback = $false
163-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
184+
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
164185
if ($testPlayback) {
165186
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
166187
} else {
@@ -174,6 +195,9 @@ begin {
174195
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
175196
}
176197
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
198+
if ($wrappedCmd -eq $null) {
199+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
200+
}
177201
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
178202
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
179203
$steppablePipeline.Begin($PSCmdlet)

generated/FluidRelay/FluidRelay.Autorest/exports/Get-AzFluidRelayServerKey.ps1

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Get primary and secondary key for this server.
2323
Get-AzFluidRelayServerKey -FluidRelayServerName azps-fluidrelay -ResourceGroup azpstest-gp
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601.IFluidRelayServerKeys
26+
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayServerKeys
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.fluidrelay/get-azfluidrelayserverkey
2929
#>
3030
function Get-AzFluidRelayServerKey {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601.IFluidRelayServerKeys])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayServerKeys])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3333
param(
3434
[Parameter(Mandatory)]
@@ -106,6 +106,15 @@ begin {
106106
$PSBoundParameters['OutBuffer'] = 1
107107
}
108108
$parameterSet = $PSCmdlet.ParameterSetName
109+
110+
$testPlayback = $false
111+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
112+
113+
$context = Get-AzContext
114+
if (-not $context -and -not $testPlayback) {
115+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
116+
exit
117+
}
109118

110119
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
111120
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -127,9 +136,7 @@ begin {
127136
$mapping = @{
128137
List = 'Az.FluidRelay.private\Get-AzFluidRelayServerKey_List';
129138
}
130-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
131-
$testPlayback = $false
132-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
139+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
133140
if ($testPlayback) {
134141
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
135142
} else {
@@ -143,6 +150,9 @@ begin {
143150
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
144151
}
145152
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
153+
if ($wrappedCmd -eq $null) {
154+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
155+
}
146156
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
147157
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
148158
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)