Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HDInsight on AKS] New Api version 2023-11-01-preview #24375

Merged
merged 18 commits into from
Mar 25, 2024
Merged
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-AzHdInsightOnAksClusterInstanceView', 'Get-AzHdInsightOnAksClusterJob', 'Get-AzHdInsightOnAksClusterPool', 'Get-AzHdInsightOnAksClusterServiceConfig', 'New-AzHdInsightOnAksCluster', 'New-AzHdInsightOnAksClusterConfigFileObject', 'New-AzHdInsightOnAksClusterPool', '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-AzHdInsightOnAksClusterPoolTag'
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'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'HdInsightOnAks'
Expand Down
10 changes: 4 additions & 6 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
This directory contains the PowerShell module for the HdInsightOnAks service.

---
## Status
[![Az.HdInsightOnAks](https://img.shields.io/powershellgallery/v/Az.HdInsightOnAks.svg?style=flat-square&label=Az.HdInsightOnAks "Az.HdInsightOnAks")](https://www.powershellgallery.com/packages/Az.HdInsightOnAks/)

## Info
- Modifiable: yes
- Generated: all
Expand Down Expand Up @@ -49,14 +46,15 @@ In this directory, run AutoRest:
### General settings
> Values
``` yaml
commit: f09aacf4c6b63be416212cb182f6b31e8bc6d545
tag: package-preview-2023-11
vidai-msft marked this conversation as resolved.
Show resolved Hide resolved
commit: 754d31188c080f20b8155acdf8b8fbd77dace467
require:
- $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md

# input-file:
# - D:\source\azure-rest-api-specs\specification\hdinsight\resource-manager\Microsoft.HDInsight\HDInsightOnAks\preview\2023-06-01-preview\hdinsight.json
inlining-threshold: 100
# - D:\HDI-Repo\azure-rest-api-specs\specification\hdinsight\resource-manager\Microsoft.HDInsight\HDInsightOnAks\preview\2023-11-01-preview\hdinsight.json
yuc-Li marked this conversation as resolved.
Show resolved Hide resolved
inlining-threshold: 200
```

> Names
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------

function New-AzHdInsightOnAksClusterHotfixUpgradeObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterUpgrade])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
yuc-Li marked this conversation as resolved.
Show resolved Hide resolved
param(
[Parameter(ParameterSetName = 'Create', Mandatory)]
[System.String]
# Name of component to be upgraded.
${ComponentName},

[Parameter(ParameterSetName = 'Create', Mandatory)]
[System.String]
# Target build number of component to be upgraded.
${TargetBuildNumber},

[Parameter(ParameterSetName = 'Create', Mandatory)]
[System.String]
# Target cluster version of component to be upgraded.
${TargetClusterVersion},

[Parameter(ParameterSetName = 'Create', Mandatory)]
[System.String]
# Target OSS version of component to be upgraded.
${TargetOssVersion}
)
process {
try {
$hotfixProperty = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterHotfixUpgradeProperties -Property `
@{ComponentName = $ComponentName;
TargetBuildNumber = $TargetBuildNumber;
TargetClusterVersion = $TargetClusterVersion;
TargetOssVersion = $TargetOssVersion;
}

$hotfixObject = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade -Property `
@{Property = $hotfixProperty }

return $hotfixObject
}
catch {
throw
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------

function New-AzHdInsightOnAksClusterPoolAKSUpgradeObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterUpgrade])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
yuc-Li marked this conversation as resolved.
Show resolved Hide resolved
param(
[Parameter(ParameterSetName = 'Create')]
[System.String]
# Target AKS version. When it's not set, latest version will be used. When upgradeClusterPool is true and upgradeAllClusterNodes is false, target version should be greater or equal to current version. When upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be equal to AKS version of cluster pool.
${TargetAksVersion},

[Parameter(ParameterSetName = 'Create')]
[System.String]
# whether upgrade all clusters' nodes. If it's true, upgradeClusterPool should be false.
${UpgradeAllClusterNode},

[Parameter(ParameterSetName = 'Create')]
[System.String]
# whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes should be false.
${UpgradeClusterPool}
)
process {
try {
$aksPatchProperty = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterPoolAksPatchVersionUpgradeProperties -Property `
@{TargetAksVersion = $TargetAksVersion;
UpgradeAllClusterNode = $UpgradeAllClusterNode;
UpgradeClusterPool = $UpgradeClusterPool;
}

$AKSPatchatchObject = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterPoolUpgrade -Property `
@{Property = $aksPatchProperty }

return $AKSPatchatchObject
}
catch {
throw
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Returns a list of available cluster versions.
### [Get-AzHdInsightOnAksCluster](Get-AzHdInsightOnAksCluster.md)
Gets a HDInsight cluster.

### [Get-AzHdInsightOnAksClusterAvailableUpgrade](Get-AzHdInsightOnAksClusterAvailableUpgrade.md)
List a cluster available upgrade.

### [Get-AzHdInsightOnAksClusterInstanceView](Get-AzHdInsightOnAksClusterInstanceView.md)
Gets the status of a cluster instance.

Expand All @@ -29,6 +32,9 @@ Get jobs of HDInsight on AKS cluster.
### [Get-AzHdInsightOnAksClusterPool](Get-AzHdInsightOnAksClusterPool.md)
Gets a cluster pool.

### [Get-AzHdInsightOnAksClusterPoolAvailableUpgrade](Get-AzHdInsightOnAksClusterPoolAvailableUpgrade.md)
List a cluster pool available upgrade.

### [Get-AzHdInsightOnAksClusterServiceConfig](Get-AzHdInsightOnAksClusterServiceConfig.md)
Lists the config dump of all services running in cluster.

Expand All @@ -38,9 +44,15 @@ Creates a cluster.
### [New-AzHdInsightOnAksClusterConfigFileObject](New-AzHdInsightOnAksClusterConfigFileObject.md)
Create cluster config file.

### [New-AzHdInsightOnAksClusterHotfixUpgradeObject](New-AzHdInsightOnAksClusterHotfixUpgradeObject.md)


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

### [New-AzHdInsightOnAksClusterPoolAKSUpgradeObject](New-AzHdInsightOnAksClusterPoolAKSUpgradeObject.md)


### [New-AzHdInsightOnAksClusterServiceConfigObject](New-AzHdInsightOnAksClusterServiceConfigObject.md)
Create a component config.

Expand Down Expand Up @@ -80,6 +92,9 @@ Check the availability of the resource name.
### [Update-AzHdInsightOnAksCluster](Update-AzHdInsightOnAksCluster.md)
Updates an existing Cluster.

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

### [Update-AzHdInsightOnAksClusterPoolTag](Update-AzHdInsightOnAksClusterPoolTag.md)
Updates an existing Cluster Pool Tags.

Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Get a HDInsight gen2 cluster

### -ClusterpoolInputObject
Identity Parameter
To construct, see NOTES section for CLUSTERPOOLINPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IHdInsightOnAksIdentity
Expand Down Expand Up @@ -130,7 +129,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IHdInsightOnAksIdentity
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
---
external help file:
Module Name: Az.HdInsightOnAks
online version: https://learn.microsoft.com/powershell/module/az.hdinsightonaks/get-azhdinsightonaksclusteravailableupgrade
schema: 2.0.0
---

# Get-AzHdInsightOnAksClusterAvailableUpgrade

## SYNOPSIS
List a cluster available upgrade.

## SYNTAX

```
Get-AzHdInsightOnAksClusterAvailableUpgrade -ClusterName <String> -ClusterPoolName <String>
-ResourceGroupName <String> [-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [<CommonParameters>]
```

## DESCRIPTION
List a cluster available upgrade.

## EXAMPLES

### Example 1: List a cluster available upgrade.
```powershell
Get-AzHdInsightOnAksClusterAvailableUpgrade -ResourceGroupName PStestGroup -ClusterPoolName hilo-pool -ClusterName flinkcluster
```

```output
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PStestGroup/providers/Microsoft.HDInsight/clusterpools/hilo-pool/clusters/flinkcluster/availableUpgrades/HotfixUpgrade_Webssh_0.4.2-1.1.1.6_20240103
Name : HotfixUpgrade_Webssh_0.4.2-1.1.1.6_20240103
Property : {
"upgradeType": "HotfixUpgrade",
"description": "BugBash",
"sourceOssVersion": "0.4.2",
"sourceClusterVersion": "1.1.1",
"sourceBuildNumber": "6",
"targetOssVersion": "0.4.2",
"targetClusterVersion": "1.1.1",
"targetBuildNumber": "7",
"componentName": "Webssh",
"severity": "low",
"extendedProperties": " ",
"createdTime": "2024-03-12T07:22:42.0000000Z"
}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type :
UpgradeType : HotfixUpgrade
```

List a flink cluster available upgrade.

## PARAMETERS

### -ClusterName
The name of the HDInsight cluster.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ClusterPoolName
The name of the cluster pool.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

```yaml
Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceGroupName
The name of the resource group.
The name is case insensitive.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterAvailableUpgrade

## NOTES

## RELATED LINKS

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ Accept wildcard characters: False

### -ClusterpoolInputObject
Identity Parameter
To construct, see NOTES section for CLUSTERPOOLINPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IHdInsightOnAksIdentity
Expand Down Expand Up @@ -128,7 +127,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IHdInsightOnAksIdentity
Expand Down
Loading
Loading