Skip to content

Commit b588681

Browse files
azure-pipelines[bot]azure-powershell-botVeryEarly
authored
Migrate HdInsightOnAks from generation to release-2024-08-06 (#25707)
* Move HdInsightOnAks to release-2024-08-06 * Update ChangeLog.md --------- Co-authored-by: azure-powershell-bot <[email protected]> Co-authored-by: Yabo Hu <[email protected]>
1 parent 4396f58 commit b588681

File tree

456 files changed

+52917
-9568
lines changed

Some content is hidden

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

456 files changed

+52917
-9568
lines changed

src/HdInsightOnAks/HdInsightOnAks.Autorest/Az.HdInsightOnAks.format.ps1xml

Lines changed: 1459 additions & 37 deletions
Large diffs are not rendered by default.

src/HdInsightOnAks/HdInsightOnAks.Autorest/Az.HdInsightOnAks.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.HdInsightOnAks.private.dll'
1313
FormatsToProcess = './Az.HdInsightOnAks.format.ps1xml'
14-
FunctionsToExport = 'Get-AzHdInsightOnAksAvailableClusterPoolVersion', 'Get-AzHdInsightOnAksAvailableClusterVersion', 'Get-AzHdInsightOnAksCluster', 'Get-AzHdInsightOnAksClusterAvailableUpgrade', 'Get-AzHdInsightOnAksClusterInstanceView', 'Get-AzHdInsightOnAksClusterJob', 'Get-AzHdInsightOnAksClusterPool', 'Get-AzHdInsightOnAksClusterPoolAvailableUpgrade', 'Get-AzHdInsightOnAksClusterServiceConfig', 'New-AzHdInsightOnAksCluster', 'New-AzHdInsightOnAksClusterConfigFileObject', 'New-AzHdInsightOnAksClusterHotfixUpgradeObject', 'New-AzHdInsightOnAksClusterPool', 'New-AzHdInsightOnAksClusterPoolAKSUpgradeObject', 'New-AzHdInsightOnAksClusterServiceConfigObject', 'New-AzHdInsightOnAksClusterServiceConfigsProfileObject', 'New-AzHdInsightOnAksFlinkJobObject', 'New-AzHdInsightOnAksNodeProfileObject', 'New-AzHdInsightOnAksSecretReferenceObject', 'New-AzHdInsightOnAksTrinoHiveCatalogObject', 'Remove-AzHdInsightOnAksCluster', 'Remove-AzHdInsightOnAksClusterPool', 'Resize-AzHdInsightOnAksCluster', 'Set-AzHdInsightOnAksClusterPool', 'Start-AzHdInsightOnAksClusterJob', 'Test-AzHdInsightOnAksLocationNameAvailability', 'Update-AzHdInsightOnAksCluster', 'Update-AzHdInsightOnAksClusterPool', 'Update-AzHdInsightOnAksClusterPoolTag'
14+
FunctionsToExport = 'Get-AzHdInsightOnAksAvailableClusterPoolVersion', 'Get-AzHdInsightOnAksAvailableClusterVersion', 'Get-AzHdInsightOnAksCluster', 'Get-AzHdInsightOnAksClusterAvailableUpgrade', 'Get-AzHdInsightOnAksClusterInstanceView', 'Get-AzHdInsightOnAksClusterJob', 'Get-AzHdInsightOnAksClusterLibrary', 'Get-AzHdInsightOnAksClusterPool', 'Get-AzHdInsightOnAksClusterPoolAvailableUpgrade', 'Get-AzHdInsightOnAksClusterPoolUpgradeHistory', 'Get-AzHdInsightOnAksClusterServiceConfig', 'Get-AzHdInsightOnAksClusterUpgradeHistory', 'Invoke-AzHdInsightOnAksClusterManualRollback', 'Invoke-AzHdInsightOnAksClusterPoolUpgrade', 'Invoke-AzHdInsightOnAksClusterUpgrade', 'Invoke-AzHdInsightOnAksManageClusterLibrary', 'New-AzHdInsightOnAksCluster', 'New-AzHdInsightOnAksClusterConfigFileObject', 'New-AzHdInsightOnAksClusterHotfixUpgradeObject', 'New-AzHdInsightOnAksClusterMavenLibraryObject', 'New-AzHdInsightOnAksClusterPool', 'New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject', 'New-AzHdInsightOnAksClusterPyPiLibraryObject', 'New-AzHdInsightOnAksClusterServiceConfigObject', 'New-AzHdInsightOnAksClusterServiceConfigsProfileObject', 'New-AzHdInsightOnAksFlinkJobObject', 'New-AzHdInsightOnAksManagedIdentityObject', 'New-AzHdInsightOnAksNodeProfileObject', 'New-AzHdInsightOnAksSecretReferenceObject', 'New-AzHdInsightOnAksTrinoHiveCatalogObject', 'Remove-AzHdInsightOnAksCluster', 'Remove-AzHdInsightOnAksClusterPool', 'Resize-AzHdInsightOnAksCluster', 'Set-AzHdInsightOnAksClusterPool', 'Start-AzHdInsightOnAksClusterJob', 'Test-AzHdInsightOnAksLocationNameAvailability', 'Update-AzHdInsightOnAksCluster', 'Update-AzHdInsightOnAksClusterPoolTag'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'HdInsightOnAks'

src/HdInsightOnAks/HdInsightOnAks.Autorest/README.md

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ In this directory, run AutoRest:
4646
### General settings
4747
> Values
4848
``` yaml
49-
tag: package-preview-2023-11
50-
commit: 754d31188c080f20b8155acdf8b8fbd77dace467
49+
tag: package-preview-2024-05
50+
commit: c766bb559e93067acf5a852e63f7edcee75a2f5b
5151
require:
5252
- $(this-folder)/../../readme.azure.noprofile.md
5353
- $(repo)/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md
@@ -71,6 +71,23 @@ default-exclude-tableview-properties: true
7171
``` yaml
7272
identity-correction-for-post: true
7373
directive:
74+
- model-cmdlet:
75+
- model-name: ManagedIdentitySpec
76+
cmdlet-name: New-AzHdInsightOnAksManagedIdentityObject
77+
- model-name: ClusterPoolAksPatchVersionUpgradeProperties
78+
cmdlet-name: New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject
79+
- model-name: NodeProfile
80+
cmdlet-name: New-AzHdInsightOnAksNodeProfileObject
81+
- model-name: SecretReference
82+
cmdlet-name: New-AzHdInsightOnAksSecretReferenceObject
83+
- model-name: HiveCatalogOption
84+
cmdlet-name: New-AzHdInsightOnAksTrinoHiveCatalogObject
85+
- model-name: ClusterConfigFile
86+
cmdlet-name: New-AzHdInsightOnAksClusterConfigFileObject
87+
- model-name: ClusterServiceConfig
88+
cmdlet-name: New-AzHdInsightOnAksClusterServiceConfigObject
89+
- model-name: ClusterServiceConfigsProfile
90+
cmdlet-name: New-AzHdInsightOnAksClusterServiceConfigsProfileObject
7491
- from: swagger-document
7592
where: $.paths..responses.202
7693
transform: delete $.headers
@@ -122,7 +139,17 @@ directive:
122139
model-name: ClusterVersion
123140
property-name: PropertiesClusterVersion
124141
set:
125-
property-name: ClusterVersionValue
142+
property-name: ClusterVersionValue
143+
- where:
144+
model-name: SecretReference
145+
property-name: KeyVaultObjectName
146+
set:
147+
property-name: SecretName
148+
- where:
149+
model-name: ClusterServiceConfig
150+
property-name: Component
151+
set:
152+
property-name: ComponentName
126153
# the below is cmdlet part
127154
- where:
128155
verb: New|Set
@@ -309,5 +336,24 @@ directive:
309336
set:
310337
parameter-name: FlinkHiveCatalogDbUserName
311338
# The below customize the output model
312-
339+
- where:
340+
verb: Update
341+
subject: [Cluster]
342+
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
343+
set:
344+
verb: Invoke
345+
subject: ClusterUpgrade
346+
- where:
347+
verb: Update
348+
subject: [ClusterManualRollback]
349+
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
350+
set:
351+
verb: Invoke
352+
- where:
353+
verb: Update
354+
subject: [ClusterPool]
355+
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
356+
set:
357+
verb: Invoke
358+
subject: ClusterPoolUpgrade
313359
```

src/HdInsightOnAks/HdInsightOnAks.Autorest/UX/Microsoft.HDInsight/clusterpools-clusters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "clusterpools/clusters",
3-
"apiVersion": "2023-11-01-preview",
3+
"apiVersion": "2024-05-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
66
},

src/HdInsightOnAks/HdInsightOnAks.Autorest/UX/Microsoft.HDInsight/clusterpools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "clusterpools",
3-
"apiVersion": "2023-11-01-preview",
3+
"apiVersion": "2024-05-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
66
},

src/HdInsightOnAks/HdInsightOnAks.Autorest/build-module.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
15+
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -130,7 +130,7 @@ $examplesFolder = Join-Path $PSScriptRoot 'examples'
130130
$null = New-Item -ItemType Directory -Force -Path $examplesFolder
131131

132132
Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
133-
$modelCmdlets = @()
133+
$modelCmdlets = @(@{modelName="ManagedIdentitySpec"; cmdletName="New-AzHdInsightOnAksManagedIdentityObject"}, @{modelName="ClusterPoolAksPatchVersionUpgradeProperties"; cmdletName="New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject"}, @{modelName="NodeProfile"; cmdletName="New-AzHdInsightOnAksNodeProfileObject"}, @{modelName="SecretReference"; cmdletName="New-AzHdInsightOnAksSecretReferenceObject"}, @{modelName="HiveCatalogOption"; cmdletName="New-AzHdInsightOnAksTrinoHiveCatalogObject"}, @{modelName="ClusterConfigFile"; cmdletName="New-AzHdInsightOnAksClusterConfigFileObject"}, @{modelName="ClusterServiceConfig"; cmdletName="New-AzHdInsightOnAksClusterServiceConfigObject"}, @{modelName="ClusterServiceConfigsProfile"; cmdletName="New-AzHdInsightOnAksClusterServiceConfigsProfileObject"})
134134
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
135135
if (Test-Path $modelCmdletFolder) {
136136
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
@@ -177,4 +177,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
177177
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
178178
}
179179

180+
if (-not $DisableAfterBuildTasks){
181+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
182+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
183+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
184+
Write-Host -ForegroundColor Green 'Running after build tasks...'
185+
. $afterBuildTasksPath @afterBuildTasksArgs
186+
}
187+
}
188+
189+
180190
Write-Host -ForegroundColor Green '-------------Done-------------'

src/HdInsightOnAks/HdInsightOnAks.Autorest/custom/New-AzHdInsightOnAksClusterConfigFileObject.ps1

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
12
# ----------------------------------------------------------------------------------
2-
#
3-
# Copyright Microsoft Corporation
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
@@ -10,59 +10,60 @@
1010
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
13+
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
14+
# is regenerated.
1315
# ----------------------------------------------------------------------------------
1416

1517
<#
1618
.Synopsis
17-
Create an object to hold the cluster upgrade parameters.
19+
Create an in-memory object for ClusterHotfixUpgradeProperties.
1820
.Description
19-
Create an object to hold the cluster upgrade parameters.
21+
Create an in-memory object for ClusterHotfixUpgradeProperties.
2022
2123
.Outputs
22-
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade
24+
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterHotfixUpgradeProperties
2325
.Link
24-
https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightOnAksClusterHotfixUpgradeObject
26+
https://learn.microsoft.com/powershell/module/Az.HdInsightOnAks/new-azhdinsightonaksclusterhotfixupgradeobject
2527
#>
2628
function New-AzHdInsightOnAksClusterHotfixUpgradeObject {
27-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterUpgrade])]
28-
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
29-
param(
30-
[Parameter(ParameterSetName = 'Create')]
31-
[System.String]
32-
# Name of component to be upgraded.
33-
${ComponentName},
34-
35-
[Parameter(ParameterSetName = 'Create')]
36-
[System.String]
37-
# Target build number of component to be upgraded.
38-
${TargetBuildNumber},
39-
40-
[Parameter(ParameterSetName = 'Create')]
41-
[System.String]
42-
# Target cluster version of component to be upgraded.
43-
${TargetClusterVersion},
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterUpgrade')]
30+
[CmdletBinding(PositionalBinding=$false)]
31+
Param(
4432

45-
[Parameter(ParameterSetName = 'Create')]
46-
[System.String]
47-
# Target OSS version of component to be upgraded.
48-
${TargetOssVersion}
33+
[Parameter(HelpMessage="Name of component to be upgraded.")]
34+
[string]
35+
$ComponentName,
36+
[Parameter(HelpMessage="Target build number of component to be upgraded.")]
37+
[string]
38+
$TargetBuildNumber,
39+
[Parameter(HelpMessage="Target cluster version of component to be upgraded.")]
40+
[string]
41+
$TargetClusterVersion,
42+
[Parameter(HelpMessage="Target OSS version of component to be upgraded.")]
43+
[string]
44+
$TargetOssVersion
4945
)
46+
5047
process {
51-
try {
52-
$hotfixProperty = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterHotfixUpgradeProperties -Property `
53-
@{ComponentName = $ComponentName;
54-
TargetBuildNumber = $TargetBuildNumber;
55-
TargetClusterVersion = $TargetClusterVersion;
56-
TargetOssVersion = $TargetOssVersion;
57-
}
48+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterHotfixUpgradeProperties]::New()
5849

59-
$hotfixObject = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade -Property `
60-
@{Property = $hotfixProperty }
50+
$RequestObject = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade]::New()
6151

62-
return $hotfixObject
52+
if ($PSBoundParameters.ContainsKey('ComponentName')) {
53+
$Object.ComponentName = $ComponentName
54+
}
55+
if ($PSBoundParameters.ContainsKey('TargetBuildNumber')) {
56+
$Object.TargetBuildNumber = $TargetBuildNumber
6357
}
64-
catch {
65-
throw
58+
if ($PSBoundParameters.ContainsKey('TargetClusterVersion')) {
59+
$Object.TargetClusterVersion = $TargetClusterVersion
6660
}
61+
if ($PSBoundParameters.ContainsKey('TargetOssVersion')) {
62+
$Object.TargetOssVersion = $TargetOssVersion
63+
}
64+
65+
$RequestObject.Property = $Object
66+
return $RequestObject
6767
}
68-
}
68+
}
69+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
14+
# is regenerated.
15+
# ----------------------------------------------------------------------------------
16+
17+
<#
18+
.Synopsis
19+
Create an in-memory object for MavenLibraryProperties.
20+
.Description
21+
Create an in-memory object for MavenLibraryProperties.
22+
23+
.Outputs
24+
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.MavenLibraryProperties
25+
.Link
26+
https://learn.microsoft.com/powershell/module/Az.HdInsightOnAks/new-azhdinsightonaksclustermavenlibraryobject
27+
#>
28+
function New-AzHdInsightOnAksClusterMavenLibraryObject {
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterLibrary')]
30+
[CmdletBinding(PositionalBinding=$false)]
31+
Param(
32+
33+
[Parameter(Mandatory, HelpMessage="GroupId of the Maven package.")]
34+
[string]
35+
$GroupId,
36+
[Parameter(Mandatory, HelpMessage="ArtifactId of the Maven package.")]
37+
[string]
38+
$Name,
39+
[Parameter(HelpMessage="Version of the Maven package.")]
40+
[string]
41+
$Version,
42+
[Parameter(HelpMessage="Remark of the latest library management operation.")]
43+
[string]
44+
$Remark
45+
)
46+
47+
process {
48+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.MavenLibraryProperties]::New()
49+
50+
if ($PSBoundParameters.ContainsKey('GroupId')) {
51+
$Object.GroupId = $GroupId
52+
}
53+
if ($PSBoundParameters.ContainsKey('Name')) {
54+
$Object.Name = $Name
55+
}
56+
if ($PSBoundParameters.ContainsKey('Version')) {
57+
$Object.Version = $Version
58+
}
59+
if ($PSBoundParameters.ContainsKey('Remark')) {
60+
$Object.Remark = $Remark
61+
}
62+
63+
$LibraryObj = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterLibrary]::New()
64+
65+
$LibraryObj.Property = $Object
66+
67+
return $LibraryObj
68+
}
69+
}
70+

0 commit comments

Comments
 (0)