@@ -27,7 +27,7 @@ Get-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutN
27
27
. Inputs
28
28
Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity
29
29
. Outputs
30
- Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.Api20201120. IDefaultRollout
30
+ Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout
31
31
. Notes
32
32
COMPLEX PARAMETER PROPERTIES
33
33
@@ -44,11 +44,23 @@ INPUTOBJECT <IProviderHubIdentity>: Identity Parameter
44
44
[RolloutName <String>]: The rollout name.
45
45
[Sku <String>]: The SKU.
46
46
[SubscriptionId <String>]: The ID of the target subscription.
47
+
48
+ PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter
49
+ [Id <String>]: Resource identity path
50
+ [NestedResourceTypeFirst <String>]: The first child resource type.
51
+ [NestedResourceTypeSecond <String>]: The second child resource type.
52
+ [NestedResourceTypeThird <String>]: The third child resource type.
53
+ [NotificationRegistrationName <String>]: The notification registration.
54
+ [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub.
55
+ [ResourceType <String>]: The resource type.
56
+ [RolloutName <String>]: The rollout name.
57
+ [Sku <String>]: The SKU.
58
+ [SubscriptionId <String>]: The ID of the target subscription.
47
59
. Link
48
60
https://learn.microsoft.com/powershell/module/az.providerhub/get-azproviderhubdefaultrollout
49
61
#>
50
62
function Get-AzProviderHubDefaultRollout {
51
- [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.Api20201120. IDefaultRollout ])]
63
+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout ])]
52
64
[CmdletBinding (DefaultParameterSetName = ' List' , PositionalBinding = $false )]
53
65
param (
54
66
[Parameter (ParameterSetName = ' Get' , Mandatory )]
59
71
${ProviderNamespace} ,
60
72
61
73
[Parameter (ParameterSetName = ' Get' , Mandatory )]
74
+ [Parameter (ParameterSetName = ' GetViaIdentityProviderRegistration' , Mandatory )]
62
75
[Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category (' Path' )]
63
76
[System.String ]
64
77
# The rollout name.
@@ -76,9 +89,14 @@ param(
76
89
[Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category (' Path' )]
77
90
[Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity ]
78
91
# Identity Parameter
79
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
80
92
${InputObject} ,
81
93
94
+ [Parameter (ParameterSetName = ' GetViaIdentityProviderRegistration' , Mandatory , ValueFromPipeline )]
95
+ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category (' Path' )]
96
+ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity ]
97
+ # Identity Parameter
98
+ ${ProviderRegistrationInputObject} ,
99
+
82
100
[Parameter ()]
83
101
[Alias (' AzureRMContext' , ' AzureCredential' )]
84
102
[ValidateNotNull ()]
@@ -135,6 +153,15 @@ begin {
135
153
$PSBoundParameters [' OutBuffer' ] = 1
136
154
}
137
155
$parameterSet = $PSCmdlet.ParameterSetName
156
+
157
+ $testPlayback = $false
158
+ $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
159
+
160
+ $context = Get-AzContext
161
+ if (-not $context -and -not $testPlayback ) {
162
+ Write-Error " No Azure login detected. Please run 'Connect-AzAccount' to log in."
163
+ exit
164
+ }
138
165
139
166
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion) {
140
167
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion = $PSVersionTable.PSVersion.ToString ()
@@ -156,11 +183,10 @@ begin {
156
183
$mapping = @ {
157
184
Get = ' Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_Get' ;
158
185
GetViaIdentity = ' Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_GetViaIdentity' ;
186
+ GetViaIdentityProviderRegistration = ' Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_GetViaIdentityProviderRegistration' ;
159
187
List = ' Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_List' ;
160
188
}
161
- if ((' Get' , ' List' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' )) {
162
- $testPlayback = $false
163
- $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
189
+ if ((' Get' , ' List' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
164
190
if ($testPlayback ) {
165
191
$PSBoundParameters [' SubscriptionId' ] = . (Join-Path $PSScriptRoot ' ..' ' utils' ' Get-SubscriptionIdTestSafe.ps1' )
166
192
} else {
@@ -174,6 +200,9 @@ begin {
174
200
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name )
175
201
}
176
202
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Cmdlet)
203
+ if ($wrappedCmd -eq $null ) {
204
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Function)
205
+ }
177
206
$scriptCmd = {& $wrappedCmd @PSBoundParameters }
178
207
$steppablePipeline = $scriptCmd.GetSteppablePipeline ($MyInvocation.CommandOrigin )
179
208
$steppablePipeline.Begin ($PSCmdlet )
0 commit comments