@@ -27,33 +27,50 @@ Get-AzFluidRelayContainer -FluidRelayServerName azps-fluidrelay -ResourceGroup a
27
27
. Inputs
28
28
Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity
29
29
. Outputs
30
- Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601. IFluidRelayContainer
30
+ Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayContainer
31
31
. Notes
32
32
COMPLEX PARAMETER PROPERTIES
33
33
34
34
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.
35
35
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
+
36
43
INPUTOBJECT <IFluidRelayIdentity>: Identity Parameter
37
44
[FluidRelayContainerName <String>]: The Fluid Relay container resource name.
38
45
[FluidRelayServerName <String>]: The Fluid Relay server resource name.
39
46
[Id <String>]: Resource identity path
40
47
[ResourceGroup <String>]: The resource group containing the resource.
41
48
[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.
42
56
. Link
43
57
https://learn.microsoft.com/powershell/module/az.fluidrelay/get-azfluidrelaycontainer
44
58
#>
45
59
function Get-AzFluidRelayContainer {
46
- [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.Api20220601. IFluidRelayContainer ])]
60
+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayContainer ])]
47
61
[CmdletBinding (DefaultParameterSetName = ' List' , PositionalBinding = $false )]
48
62
param (
49
63
[Parameter (ParameterSetName = ' Get' , Mandatory )]
64
+ [Parameter (ParameterSetName = ' GetViaIdentityResourceGroup' , Mandatory )]
50
65
[Parameter (ParameterSetName = ' List' , Mandatory )]
51
66
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category (' Path' )]
52
67
[System.String ]
53
68
# The Fluid Relay server resource name.
54
69
${FluidRelayServerName} ,
55
70
56
71
[Parameter (ParameterSetName = ' Get' , Mandatory )]
72
+ [Parameter (ParameterSetName = ' GetViaIdentityFluidRelayServer' , Mandatory )]
73
+ [Parameter (ParameterSetName = ' GetViaIdentityResourceGroup' , Mandatory )]
57
74
[Alias (' FluidRelayContainerName' )]
58
75
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category (' Path' )]
59
76
[System.String ]
@@ -79,9 +96,20 @@ param(
79
96
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Category (' Path' )]
80
97
[Microsoft.Azure.PowerShell.Cmdlets.FluidRelay.Models.IFluidRelayIdentity ]
81
98
# Identity Parameter
82
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
83
99
${InputObject} ,
84
100
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
+
85
113
[Parameter ()]
86
114
[Alias (' AzureRMContext' , ' AzureCredential' )]
87
115
[ValidateNotNull ()]
@@ -138,6 +166,15 @@ begin {
138
166
$PSBoundParameters [' OutBuffer' ] = 1
139
167
}
140
168
$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
+ }
141
178
142
179
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion) {
143
180
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion = $PSVersionTable.PSVersion.ToString ()
@@ -159,11 +196,11 @@ begin {
159
196
$mapping = @ {
160
197
Get = ' Az.FluidRelay.private\Get-AzFluidRelayContainer_Get' ;
161
198
GetViaIdentity = ' Az.FluidRelay.private\Get-AzFluidRelayContainer_GetViaIdentity' ;
199
+ GetViaIdentityFluidRelayServer = ' Az.FluidRelay.private\Get-AzFluidRelayContainer_GetViaIdentityFluidRelayServer' ;
200
+ GetViaIdentityResourceGroup = ' Az.FluidRelay.private\Get-AzFluidRelayContainer_GetViaIdentityResourceGroup' ;
162
201
List = ' Az.FluidRelay.private\Get-AzFluidRelayContainer_List' ;
163
202
}
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' ) ) {
167
204
if ($testPlayback ) {
168
205
$PSBoundParameters [' SubscriptionId' ] = . (Join-Path $PSScriptRoot ' ..' ' utils' ' Get-SubscriptionIdTestSafe.ps1' )
169
206
} else {
@@ -177,6 +214,9 @@ begin {
177
214
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name )
178
215
}
179
216
$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
+ }
180
220
$scriptCmd = {& $wrappedCmd @PSBoundParameters }
181
221
$steppablePipeline = $scriptCmd.GetSteppablePipeline ($MyInvocation.CommandOrigin )
182
222
$steppablePipeline.Begin ($PSCmdlet )
0 commit comments