@@ -27,7 +27,7 @@ disk-pool-1 eastus2euap Running Succeeded {3}
27
27
. Inputs
28
28
Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.IDiskPoolIdentity
29
29
. Outputs
30
- Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210801. IDiskPool
30
+ Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.IDiskPool
31
31
. Notes
32
32
COMPLEX PARAMETER PROPERTIES
33
33
@@ -47,24 +47,30 @@ INPUTOBJECT <IDiskPoolIdentity>: Identity Parameter
47
47
https://learn.microsoft.com/powershell/module/az.diskpool/update-azdiskpool
48
48
#>
49
49
function Update-AzDiskPool {
50
- [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210801. IDiskPool ])]
50
+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.IDiskPool ])]
51
51
[CmdletBinding (DefaultParameterSetName = ' UpdateExpanded' , PositionalBinding = $false , SupportsShouldProcess , ConfirmImpact = ' Medium' )]
52
52
param (
53
53
[Parameter (ParameterSetName = ' UpdateExpanded' , Mandatory )]
54
+ [Parameter (ParameterSetName = ' UpdateViaJsonFilePath' , Mandatory )]
55
+ [Parameter (ParameterSetName = ' UpdateViaJsonString' , Mandatory )]
54
56
[Alias (' DiskPoolName' )]
55
57
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Path' )]
56
58
[System.String ]
57
59
# The name of the Disk Pool.
58
60
${Name} ,
59
61
60
62
[Parameter (ParameterSetName = ' UpdateExpanded' , Mandatory )]
63
+ [Parameter (ParameterSetName = ' UpdateViaJsonFilePath' , Mandatory )]
64
+ [Parameter (ParameterSetName = ' UpdateViaJsonString' , Mandatory )]
61
65
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Path' )]
62
66
[System.String ]
63
67
# The name of the resource group.
64
68
# The name is case insensitive.
65
69
${ResourceGroupName} ,
66
70
67
71
[Parameter (ParameterSetName = ' UpdateExpanded' )]
72
+ [Parameter (ParameterSetName = ' UpdateViaJsonFilePath' )]
73
+ [Parameter (ParameterSetName = ' UpdateViaJsonString' )]
68
74
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Path' )]
69
75
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Runtime.DefaultInfo (Script= ' (Get-AzContext).Subscription.Id' )]
70
76
[System.String ]
@@ -75,56 +81,74 @@ param(
75
81
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Path' )]
76
82
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.IDiskPoolIdentity ]
77
83
# Identity Parameter
78
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
79
84
${InputObject} ,
80
85
81
- [Parameter ()]
86
+ [Parameter (ParameterSetName = ' UpdateExpanded' )]
87
+ [Parameter (ParameterSetName = ' UpdateViaIdentityExpanded' )]
82
88
[AllowEmptyCollection ()]
83
89
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
84
90
[System.String []]
85
91
# List of Azure Managed Disks to attach to a Disk Pool.
86
92
# To construct, see NOTES section for DISK properties and create a hash table.
87
93
${DiskId} ,
88
94
89
- [Parameter ()]
95
+ [Parameter (ParameterSetName = ' UpdateExpanded' )]
96
+ [Parameter (ParameterSetName = ' UpdateViaIdentityExpanded' )]
90
97
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
91
98
[System.String ]
92
99
# Azure resource id.
93
100
# Indicates if this resource is managed by another Azure resource.
94
101
${ManagedBy} ,
95
102
96
- [Parameter ()]
103
+ [Parameter (ParameterSetName = ' UpdateExpanded' )]
104
+ [Parameter (ParameterSetName = ' UpdateViaIdentityExpanded' )]
97
105
[AllowEmptyCollection ()]
98
106
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
99
107
[System.String []]
100
108
# List of Azure resource ids that manage this resource.
101
109
${ManagedByExtended} ,
102
110
103
- [Parameter ()]
111
+ [Parameter (ParameterSetName = ' UpdateExpanded' )]
112
+ [Parameter (ParameterSetName = ' UpdateViaIdentityExpanded' )]
104
113
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
105
114
[System.String ]
106
115
# Sku name
107
116
${SkuName} ,
108
117
109
- [Parameter ()]
118
+ [Parameter (ParameterSetName = ' UpdateExpanded' )]
119
+ [Parameter (ParameterSetName = ' UpdateViaIdentityExpanded' )]
110
120
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
111
121
[System.String ]
112
122
# Sku tier
113
123
${SkuTier} ,
114
124
115
- [Parameter ()]
125
+ [Parameter (ParameterSetName = ' UpdateExpanded' )]
126
+ [Parameter (ParameterSetName = ' UpdateViaIdentityExpanded' )]
116
127
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
117
- [Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Runtime.Info (PossibleTypes= ([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210801. IDiskPoolUpdateTags ]))]
128
+ [Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Runtime.Info (PossibleTypes= ([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.IDiskPoolUpdateTags ]))]
118
129
[System.Collections.Hashtable ]
119
130
# Resource tags.
120
131
${Tag} ,
121
132
133
+ [Parameter (ParameterSetName = ' UpdateViaJsonFilePath' , Mandatory )]
134
+ [Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
135
+ [System.String ]
136
+ # Path of Json file supplied to the Update operation
137
+ ${JsonFilePath} ,
138
+
139
+ [Parameter (ParameterSetName = ' UpdateViaJsonString' , Mandatory )]
140
+ [Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Body' )]
141
+ [System.String ]
142
+ # Json string supplied to the Update operation
143
+ ${JsonString} ,
144
+
122
145
[Parameter ()]
123
146
[Alias (' AzureRMContext' , ' AzureCredential' )]
124
147
[ValidateNotNull ()]
125
148
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category (' Azure' )]
126
149
[System.Management.Automation.PSObject ]
127
- # The credentials, account, tenant, and subscription used for communication with Azure.
150
+ # The DefaultProfile parameter is not functional.
151
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
128
152
${DefaultProfile} ,
129
153
130
154
[Parameter ()]
@@ -178,21 +202,21 @@ param(
178
202
# Use the default credentials for the proxy
179
203
${ProxyUseDefaultCredentials}
180
204
)
181
- process {
182
- try {
183
- if ($PSBoundParameters.ContainsKey (" DiskId" )){
184
- $disk = @ ()
185
- for ($i = 0 ; $i -lt $DiskId.Count ; $i ++ ) {
186
- $diskObject = New-Object - TypeName Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210801 .Disk
187
- $diskObject.Id = $DiskId [$i ]
188
- $disk += $diskObject
189
- }
190
- $PSBoundParameters [" Disk" ] = $disk
191
- $null = $PSBoundParameters.Remove (" DiskId" )
192
- }
193
- Az.DiskPool.internal\Update-AzDiskPool @PSBoundParameters
194
- } catch {
195
- throw
196
- }
205
+ process {
206
+ try {
207
+ if ($PSBoundParameters.ContainsKey (" DiskId" )){
208
+ $disk = @ ()
209
+ for ($i = 0 ; $i -lt $DiskId.Count ; $i ++ ) {
210
+ $diskObject = New-Object - TypeName Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Disk
211
+ $diskObject.Id = $DiskId [$i ]
212
+ $disk += $diskObject
213
+ }
214
+ $PSBoundParameters [" Disk" ] = $disk
215
+ $null = $PSBoundParameters.Remove (" DiskId" )
216
+ }
217
+ Az.DiskPool.internal\Update-AzDiskPool @PSBoundParameters
218
+ } catch {
219
+ throw
220
+ }
197
221
}
198
222
}
0 commit comments