Skip to content

Commit

Permalink
[HDInsight on AKS] New Api version 2024-05-01-preview #2 (#25687)
Browse files Browse the repository at this point in the history
* Init readme.

split Update to 2 command: Update and Upgrade.

* Update readme

* Update examples.

* Update test and records

* Update a example.

* Resolve pipeline issues.

* Update SignatureIssues

* Update.

* Fix pipeline errors.

* Update a example

* Rename properties

* Update to 2024-05-01-preview

* Update a example

* Rename commands Upgrade-xxx to Invoke-xxxUpgrade

* Remove unused files.

* Update SignatureIssues.csv

* Update a autogen cmdlet to custom cmdlet

---------

Co-authored-by: v-yuchenli <[email protected]>
Co-authored-by: Yabo Hu <[email protected]>
  • Loading branch information
3 people authored Jul 31, 2024
1 parent 8735795 commit 6c5282e
Show file tree
Hide file tree
Showing 17 changed files with 154 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.HdInsightOnAks.private.dll'
FormatsToProcess = './Az.HdInsightOnAks.format.ps1xml'
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-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', 'Upgrade-AzHdInsightOnAksCluster', 'Upgrade-AzHdInsightOnAksClusterManualRollback', 'Upgrade-AzHdInsightOnAksClusterPool'
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'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'HdInsightOnAks'
Expand Down
21 changes: 16 additions & 5 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ directive:
- model-cmdlet:
- model-name: ManagedIdentitySpec
cmdlet-name: New-AzHdInsightOnAksManagedIdentityObject
- model-name: ClusterHotfixUpgradeProperties
cmdlet-name: New-AzHdInsightOnAksClusterHotfixUpgradeObject
- model-name: ClusterPoolAksPatchVersionUpgradeProperties
cmdlet-name: New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject
- model-name: NodeProfile
Expand Down Expand Up @@ -340,9 +338,22 @@ directive:
# The below customize the output model
- where:
verb: Update
subject: [Cluster|ClusterPool]
subject: [Cluster]
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
set:
verb: Upgrade

verb: Invoke
subject: ClusterUpgrade
- where:
verb: Update
subject: [ClusterManualRollback]
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
set:
verb: Invoke
- where:
verb: Update
subject: [ClusterPool]
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
set:
verb: Invoke
subject: ClusterPoolUpgrade
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create an in-memory object for ClusterHotfixUpgradeProperties.
.Description
Create an in-memory object for ClusterHotfixUpgradeProperties.
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterHotfixUpgradeProperties
.Link
https://learn.microsoft.com/powershell/module/Az.HdInsightOnAks/new-azhdinsightonaksclusterhotfixupgradeobject
#>
function New-AzHdInsightOnAksClusterHotfixUpgradeObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterUpgrade')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(HelpMessage="Name of component to be upgraded.")]
[string]
$ComponentName,
[Parameter(HelpMessage="Target build number of component to be upgraded.")]
[string]
$TargetBuildNumber,
[Parameter(HelpMessage="Target cluster version of component to be upgraded.")]
[string]
$TargetClusterVersion,
[Parameter(HelpMessage="Target OSS version of component to be upgraded.")]
[string]
$TargetOssVersion
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterHotfixUpgradeProperties]::New()

$RequestObject = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade]::New()

if ($PSBoundParameters.ContainsKey('ComponentName')) {
$Object.ComponentName = $ComponentName
}
if ($PSBoundParameters.ContainsKey('TargetBuildNumber')) {
$Object.TargetBuildNumber = $TargetBuildNumber
}
if ($PSBoundParameters.ContainsKey('TargetClusterVersion')) {
$Object.TargetClusterVersion = $TargetClusterVersion
}
if ($PSBoundParameters.ContainsKey('TargetOssVersion')) {
$Object.TargetOssVersion = $TargetOssVersion
}

$RequestObject.Property = $Object
return $RequestObject
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ Lists the config dump of all services running in cluster.
### [Get-AzHdInsightOnAksClusterUpgradeHistory](Get-AzHdInsightOnAksClusterUpgradeHistory.md)
Returns a list of upgrade history.

### [Invoke-AzHdInsightOnAksClusterManualRollback](Invoke-AzHdInsightOnAksClusterManualRollback.md)
Manual rollback upgrade for a cluster.

### [Invoke-AzHdInsightOnAksClusterPoolUpgrade](Invoke-AzHdInsightOnAksClusterPoolUpgrade.md)
Upgrade a cluster pool.

### [Invoke-AzHdInsightOnAksClusterUpgrade](Invoke-AzHdInsightOnAksClusterUpgrade.md)
Upgrade a cluster.

### [Invoke-AzHdInsightOnAksManageClusterLibrary](Invoke-AzHdInsightOnAksManageClusterLibrary.md)
Library management operations on HDInsight on AKS cluster.

Expand Down Expand Up @@ -116,12 +125,3 @@ Update an existing Cluster.
### [Update-AzHdInsightOnAksClusterPoolTag](Update-AzHdInsightOnAksClusterPoolTag.md)
Update an existing Cluster Pool Tags.

### [Upgrade-AzHdInsightOnAksCluster](Upgrade-AzHdInsightOnAksCluster.md)
Upgrade a cluster.

### [Upgrade-AzHdInsightOnAksClusterManualRollback](Upgrade-AzHdInsightOnAksClusterManualRollback.md)
Manual rollback upgrade for a cluster.

### [Upgrade-AzHdInsightOnAksClusterPool](Upgrade-AzHdInsightOnAksClusterPool.md)
Upgrade a cluster pool.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
external help file:
Module Name: Az.HdInsightOnAks
online version: https://learn.microsoft.com/powershell/module/az.hdinsightonaks/upgrade-azhdinsightonaksclustermanualrollback
online version: https://learn.microsoft.com/powershell/module/az.hdinsightonaks/invoke-azhdinsightonaksclustermanualrollback
schema: 2.0.0
---

# Upgrade-AzHdInsightOnAksClusterManualRollback
# Invoke-AzHdInsightOnAksClusterManualRollback

## SYNOPSIS
Manual rollback upgrade for a cluster.
Expand All @@ -14,56 +14,56 @@ Manual rollback upgrade for a cluster.

### UpgradeExpanded (Default)
```
Upgrade-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
Invoke-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
-ResourceGroupName <String> -UpgradeHistory <String> [-SubscriptionId <String>] [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### Upgrade
```
Upgrade-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
Invoke-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
-ResourceGroupName <String> -ClusterRollbackUpgradeRequest <IClusterUpgradeRollback>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
```

### UpgradeViaIdentity
```
Upgrade-AzHdInsightOnAksClusterManualRollback -InputObject <IHdInsightOnAksIdentity>
Invoke-AzHdInsightOnAksClusterManualRollback -InputObject <IHdInsightOnAksIdentity>
-ClusterRollbackUpgradeRequest <IClusterUpgradeRollback> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
[-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpgradeViaIdentityClusterpool
```
Upgrade-AzHdInsightOnAksClusterManualRollback -ClusterName <String>
Invoke-AzHdInsightOnAksClusterManualRollback -ClusterName <String>
-ClusterpoolInputObject <IHdInsightOnAksIdentity> -ClusterRollbackUpgradeRequest <IClusterUpgradeRollback>
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpgradeViaIdentityClusterpoolExpanded
```
Upgrade-AzHdInsightOnAksClusterManualRollback -ClusterName <String>
Invoke-AzHdInsightOnAksClusterManualRollback -ClusterName <String>
-ClusterpoolInputObject <IHdInsightOnAksIdentity> -UpgradeHistory <String> [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpgradeViaIdentityExpanded
```
Upgrade-AzHdInsightOnAksClusterManualRollback -InputObject <IHdInsightOnAksIdentity> -UpgradeHistory <String>
Invoke-AzHdInsightOnAksClusterManualRollback -InputObject <IHdInsightOnAksIdentity> -UpgradeHistory <String>
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpgradeViaJsonFilePath
```
Upgrade-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
Invoke-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
-ResourceGroupName <String> -JsonFilePath <String> [-SubscriptionId <String>] [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpgradeViaJsonString
```
Upgrade-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
Invoke-AzHdInsightOnAksClusterManualRollback -ClusterName <String> -ClusterPoolName <String>
-ResourceGroupName <String> -JsonString <String> [-SubscriptionId <String>] [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```
Expand All @@ -78,7 +78,7 @@ Manual rollback upgrade for a cluster.
$clusterResourceGroupName = "Group"
$clusterpoolName = "ps-test-pool"
$clusterName = "cluster"
Upgrade-AzHdInsightOnAksClusterManualRollback -ResourceGroupName $clusterResourceGroupName -ClusterName $clusterName -ClusterPoolName $clusterpoolName -UpgradeHistory /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/weidong-devrp/providers/Microsoft.HDInsight/clusterpools/weidongbugbash57/clusters/cluster202458152055/upgradeHistories/05_11_2024_06_41_26_AM-AKSPatchUpgrade
Invoke-AzHdInsightOnAksClusterManualRollback -ResourceGroupName $clusterResourceGroupName -ClusterName $clusterName -ClusterPoolName $clusterpoolName -UpgradeHistory /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/devrp/providers/Microsoft.HDInsight/clusterpools/pool/clusters/cluster202458152055/upgradeHistories/05_11_2024_06_41_26_AM-AKSPatchUpgrade
```

Roll back the upgrade of a cluster
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
external help file:
Module Name: Az.HdInsightOnAks
online version: https://learn.microsoft.com/powershell/module/az.hdinsightonaks/upgrade-azhdinsightonaksclusterpool
online version: https://learn.microsoft.com/powershell/module/az.hdinsightonaks/invoke-azhdinsightonaksclusterpoolupgrade
schema: 2.0.0
---

# Upgrade-AzHdInsightOnAksClusterPool
# Invoke-AzHdInsightOnAksClusterPoolUpgrade

## SYNOPSIS
Upgrade a cluster pool.
Expand All @@ -14,41 +14,41 @@ Upgrade a cluster pool.

### UpgradeExpanded (Default)
```
Upgrade-AzHdInsightOnAksClusterPool -Name <String> -ResourceGroupName <String> -UpgradeType <String>
Invoke-AzHdInsightOnAksClusterPoolUpgrade -Name <String> -ResourceGroupName <String> -UpgradeType <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
```

### Upgrade
```
Upgrade-AzHdInsightOnAksClusterPool -Name <String> -ResourceGroupName <String>
Invoke-AzHdInsightOnAksClusterPoolUpgrade -Name <String> -ResourceGroupName <String>
-ClusterPoolUpgradeRequest <IClusterPoolUpgrade> [-SubscriptionId <String>] [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpgradeViaIdentity
```
Upgrade-AzHdInsightOnAksClusterPool -InputObject <IHdInsightOnAksIdentity>
Invoke-AzHdInsightOnAksClusterPoolUpgrade -InputObject <IHdInsightOnAksIdentity>
-ClusterPoolUpgradeRequest <IClusterPoolUpgrade> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm]
[-WhatIf] [<CommonParameters>]
```

### UpgradeViaIdentityExpanded
```
Upgrade-AzHdInsightOnAksClusterPool -InputObject <IHdInsightOnAksIdentity> -UpgradeType <String>
Invoke-AzHdInsightOnAksClusterPoolUpgrade -InputObject <IHdInsightOnAksIdentity> -UpgradeType <String>
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpgradeViaJsonFilePath
```
Upgrade-AzHdInsightOnAksClusterPool -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
Invoke-AzHdInsightOnAksClusterPoolUpgrade -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
```

### UpgradeViaJsonString
```
Upgrade-AzHdInsightOnAksClusterPool -Name <String> -ResourceGroupName <String> -JsonString <String>
Invoke-AzHdInsightOnAksClusterPoolUpgrade -Name <String> -ResourceGroupName <String> -JsonString <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
```
Expand All @@ -62,7 +62,7 @@ Upgrade a cluster pool.
```powershell
$clusterResourceGroupName = "Group"
$clusterpoolName = "your-clusterpool"
Upgrade-AzHdInsightOnAksClusterPool -ResourceGroupName $clusterResourceGroupName -ClusterPoolName $clusterpoolName -UpgradeType NodeOsUpgrade
Invoke-AzHdInsightOnAksClusterPoolUpgrade -ResourceGroupName $clusterResourceGroupName -ClusterPoolName $clusterpoolName -UpgradeType NodeOsUpgrade
```

```output
Expand Down Expand Up @@ -106,7 +106,7 @@ Upgrade a cluster pool and upgrade type is NodeOsUpgrade.
$clusterResourceGroupName = "Group"
$clusterpoolName = "your-clusterpool"
$upgradeObj = New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject -TargetAksVersion "1.27.9" -UpgradeClusterPool $true
Upgrade-AzHdInsightOnAksClusterPool -ResourceGroupName $clusterResourceGroupName -ClusterPoolName $clusterpoolName -ClusterPoolUpgradeRequest $upgradeObj
Invoke-AzHdInsightOnAksClusterPoolUpgrade -ResourceGroupName $clusterResourceGroupName -ClusterPoolName $clusterpoolName -ClusterPoolUpgradeRequest $upgradeObj
```

```output
Expand Down
Loading

0 comments on commit 6c5282e

Please sign in to comment.