Skip to content

Commit

Permalink
[HDInsight on AKS] New Api version 2023-11-01-preview (Azure#24375)
Browse files Browse the repository at this point in the history
* Update readme.md

* Revert module version in files

* Add a custom command.

* Update readme.md and re generate.

* Update all docs and examples.

* Update test cases and session records.

* Add a command.

* Remove generated UX folder.

* Remove local input-file value from readme.md

* Update a command params.

* Add synopsis  and des for two new custom commands.

* Add exception for signature issues.

* Fix a error for custom command.

* Fix examples errors.

* Fix an example error.

* Update examples.

* Remove "SupportsShouldProcess"

---------

Co-authored-by: v-yuchenli <v-yuchenli@microsoft.com>
  • Loading branch information
2 people authored and qinzhouxu committed Jun 5, 2024
1 parent fc39433 commit 24e14b3
Show file tree
Hide file tree
Showing 67 changed files with 6,534 additions and 3,941 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-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
11 changes: 3 additions & 8 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,12 @@ In this directory, run AutoRest:
### General settings
> Values
``` yaml
commit: f09aacf4c6b63be416212cb182f6b31e8bc6d545
tag: package-preview-2023-11
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
inlining-threshold: 200
```
> Names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightO
#>
function New-AzHdInsightOnAksClusterConfigFileObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterConfigFile])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'Create', Mandatory)]
[Alias('Name')]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create an object to hold the cluster upgrade parameters.
.Description
Create an object to hold the cluster upgrade parameters.
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade
.Link
https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightOnAksClusterHotfixUpgradeObject
#>
function New-AzHdInsightOnAksClusterHotfixUpgradeObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterUpgrade])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'Create')]
[System.String]
# Name of component to be upgraded.
${ComponentName},

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

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

[Parameter(ParameterSetName = 'Create')]
[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,62 @@
# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create an object to hold the cluster pool upgrade parameters.
.Description
Create an object to hold the cluster pool upgrade parameters.
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterPoolUpgrade
.Link
https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightOnAksClusterPoolAKSUpgradeObject
#>
function New-AzHdInsightOnAksClusterPoolAKSUpgradeObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterPoolUpgrade])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
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 @@ -25,7 +25,7 @@ https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightO
#>
function New-AzHdInsightOnAksClusterServiceConfigObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterServiceConfig])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'Create', Mandatory)]
[Alias('Name')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightO
#>
function New-AzHdInsightOnAksClusterServiceConfigsProfileObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterServiceConfigsProfile])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'Create', Mandatory)]
[Alias('Name')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightO
#>
function New-AzHdInsightOnAksFlinkJobObject{
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterJob])]
[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Create', Mandatory)]
[System.String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightO
#>
function New-AzHdInsightOnAksNodeProfileObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.INodeProfile])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'Create', Mandatory)]
[System.String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightO
#>
function New-AzHdInsightOnAksSecretReferenceObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ISecretReference])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'Create', Mandatory)]
[System.String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightO
#>
function New-AzHdInsightOnAksTrinoHiveCatalogObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IHiveCatalogOption])]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'Create', Mandatory)]
[System.String]
Expand Down
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)
Create an object to hold the cluster upgrade parameters.

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

### [New-AzHdInsightOnAksClusterPoolAKSUpgradeObject](New-AzHdInsightOnAksClusterPoolAKSUpgradeObject.md)
Create an object to hold the cluster pool upgrade parameters.

### [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
Loading

0 comments on commit 24e14b3

Please sign in to comment.