Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

Large diffs are not rendered by default.

170 changes: 20 additions & 150 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/Az.HdInsightOnAks.psd1
Original file line number Diff line number Diff line change
@@ -1,153 +1,23 @@
#
# Module manifest for module 'Az.HdInsightOnAks'
#
# Generated by: Microsoft Corporation
#
# Generated on: 9/19/2023
#

@{

# Script module or binary module file associated with this manifest.
RootModule = './Az.HdInsightOnAks.psm1'

# Version number of this module.
ModuleVersion = '0.1.0'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'

# ID used to uniquely identify this module
GUID = '5d9ea51e-3614-409d-b09a-9188a642e11c'

# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell: HdInsightOnAks cmdlets'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.1'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
DotNetFrameworkVersion = '4.7.2'

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.0'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = './bin/Az.HdInsightOnAks.private.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = './Az.HdInsightOnAks.format.ps1xml'

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
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'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()

# Variables to export from this module
# VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @()

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

GUID = '5d9ea51e-3614-409d-b09a-9188a642e11c'
RootModule = './Az.HdInsightOnAks.psm1'
ModuleVersion = '0.1.0'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'
Description = 'Microsoft Azure PowerShell: HdInsightOnAks cmdlets'
PowerShellVersion = '5.1'
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-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 applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','PSModule','HdInsightOnAks'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/Azure/azure-powershell'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'HdInsightOnAks'
LicenseUri = 'https://aka.ms/azps-license'
ProjectUri = 'https://github.com/Azure/azure-powershell'
ReleaseNotes = ''
}
}
}

24 changes: 14 additions & 10 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/Az.HdInsightOnAks.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,41 @@

# Ask for the shared functionality table
$VTable = Register-AzModule

# Tweaks the pipeline on module load
$instance.OnModuleLoad = $VTable.OnModuleLoad

# Following two delegates are added for telemetry
$instance.GetTelemetryId = $VTable.GetTelemetryId
$instance.Telemetry = $VTable.Telemetry


# Delegate to sanitize the output object
$instance.SanitizeOutput = $VTable.SanitizerHandler

# Delegate to get the telemetry info
$instance.GetTelemetryInfo = $VTable.GetTelemetryInfo

# Tweaks the pipeline per call
$instance.OnNewRequest = $VTable.OnNewRequest

# Gets shared parameter values
$instance.GetParameterValue = $VTable.GetParameterValue

# Allows shared module to listen to events from this module
$instance.EventListener = $VTable.EventListener

# Gets shared argument completers
$instance.ArgumentCompleter = $VTable.ArgumentCompleter

# The name of the currently selected Azure profile
$instance.ProfileName = $VTable.ProfileName


# Load the custom module
$customModulePath = Join-Path $PSScriptRoot './custom/Az.HdInsightOnAks.custom.psm1'
if(Test-Path $customModulePath) {
$null = Import-Module -Name $customModulePath
}

# Export nothing to clear implicit exports
Export-ModuleMember

Expand All @@ -97,12 +101,12 @@
# Load the last folder if no profile is selected
$profileDirectory = $directories | Select-Object -Last 1
}

if($profileDirectory) {
Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
$exportsPath = $profileDirectory.FullName
}

if($exportsPath) {
Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
$cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
Expand Down
13 changes: 4 additions & 9 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This directory contains the PowerShell module for the HdInsightOnAks service.

---

## Info
- Modifiable: yes
- Generated: all
Expand Down Expand Up @@ -47,14 +46,12 @@ In this directory, run AutoRest:
### General settings
> Values
``` yaml
branch: f09aacf4c6b63be416212cb182f6b31e8bc6d545
tag: package-preview-2023-11
commit: 754d31188c080f20b8155acdf8b8fbd77dace467
require:
- $(this-folder)/../readme.azure.noprofile.md
- $(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 All @@ -73,8 +70,6 @@ default-exclude-tableview-properties: true
> Directives
``` yaml
identity-correction-for-post: true
use-extension:
"@autorest/powershell": "4.0.644"
directive:
- from: swagger-document
where: $.paths..responses.202
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusterpools/clusters",
"apiVersion": "2023-06-01-preview",
"apiVersion": "2023-11-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusterpools",
"apiVersion": "2023-06-01-preview",
"apiVersion": "2023-11-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
},
Expand Down
6 changes: 6 additions & 0 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
Write-Host -ForegroundColor Green 'Creating example stubs...'
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder

if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
{
Write-Host -ForegroundColor Green 'Creating ux metadata...'
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

Write-Host -ForegroundColor Green '-------------Done-------------'
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
}
}
}
Loading