diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 index 4b3d4f871115..97abd1e31de5 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 @@ -1,135 +1,24 @@ -# -# Module manifest for module 'Az.ConnectedKubernetes' -# -# Generated by: Microsoft Corporation -# -# Generated on: 10/9/2023 -# - @{ - -# Script module or binary module file associated with this manifest. -RootModule = './Az.ConnectedKubernetes.psm1' - -# Version number of this module. -ModuleVersion = '0.10.0' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = '59df8ab1-442a-41ae-9b55-60b505bae789' - -# 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: ConnectedKubernetes 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.1'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = './bin/Az.ConnectedKubernetes.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.ConnectedKubernetes.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-AzConnectedKubernetes', - 'Get-AzConnectedKubernetesUserCredential', - 'New-AzConnectedKubernetes', 'Remove-AzConnectedKubernetes', - 'Update-AzConnectedKubernetes' - -# 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 = 'd3467834-8989-4142-8c05-ab93c4bfa6eb' + RootModule = './Az.ConnectedKubernetes.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: ConnectedKubernetes cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.ConnectedKubernetes.private.dll' + FormatsToProcess = './Az.ConnectedKubernetes.format.ps1xml' + FunctionsToExport = 'Get-AzConnectedKubernetes', 'Get-AzConnectedKubernetesUserCredential', 'New-AzConnectedKubernetes', 'Remove-AzConnectedKubernetes', 'Update-AzConnectedKubernetes', '*' + AliasesToExport = '*' + PrivateData = @{ PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','ConnectedKubernetes' - - # 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 = '* Added support for custom locations id and correlation Id.' - - # 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', 'ConnectedKubernetes' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } } - diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/README.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/README.md index ba4419c5cfa2..03984feabeca 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/README.md +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/README.md @@ -47,9 +47,9 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml -branch: ac6324d13863e8157f4b392ef0ceef1e86eea935 +commit: ac6324d13863e8157f4b392ef0ceef1e86eea935 require: - - $(this-folder)/../readme.azure.noprofile.md + - $(this-folder)/../../readme.azure.noprofile.md input-file: - $(repo)/specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2022-10-01-preview/connectedClusters.json @@ -61,6 +61,10 @@ identity-correction-for-post: true resourcegroup-append: true nested-object-to-string: true +# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option +use-extension: + "@autorest/powershell": "3.x" + directive: - where: subject: ^ConnectedCluster(.*) diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/build-module.ps1 b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/build-module.ps1 index e730cb2af5f5..09ce31b2cefa 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/build-module.ps1 +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/build-module.ps1 @@ -143,7 +143,8 @@ if($NoDocs) { $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue } $null = New-Item -ItemType Directory -Force -Path $docsFolder - Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo } Write-Host -ForegroundColor Green 'Creating format.ps1xml...' @@ -162,4 +163,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-------------' diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/custom/New-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/custom/New-AzConnectedKubernetes.ps1 index 13536ab76f6d..6184e355da29 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/custom/New-AzConnectedKubernetes.ps1 +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/custom/New-AzConnectedKubernetes.ps1 @@ -492,6 +492,7 @@ function New-AzConnectedKubernetes { } if (-not ([string]::IsNullOrEmpty($CustomLocationsOid))) { $options += " --set systemDefaultValues.customLocations.oid=$CustomLocationsOid" + $options += " --set systemDefaultValues.customLocations.enabled=true" } if (!$NoWait) { $options += " --wait --timeout $OnboardingTimeout" diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-help.ps1 b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-help.ps1 index 43d124e0c0c0..28e90f2cd24f 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-help.ps1 +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-help.ps1 @@ -66,8 +66,8 @@ foreach($directory in $directories) $docsPath = Join-Path $docsFolder $directory.Name $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue $examplesPath = Join-Path $examplesFolder $directory.Name - - Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" } diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-portal-ux.ps1 b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..c36ccf900f1d --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,375 @@ +# ---------------------------------------------------------------------------------- +# 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. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$moduleName = 'Az.ConnectedKubernetes' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If ($buildinfunctions.Contains($FunctionName)) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} \ No newline at end of file diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs index ab4fec9d4566..979e3b51f1f2 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Lists all of the available API operations for Connected Cluster resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/providers/Microsoft.Kubernetes/operations", ApiVersion = "2022-10-01-preview")] public partial class GetAzConnectedKubernetesOperation_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs index 5de60ad8e728..a94d53579212 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.ICredentialResults))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Gets cluster user credentials of the connected cluster with a specified resource group and name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential", ApiVersion = "2022-10-01-preview")] public partial class GetAzConnectedKubernetesUserCredential_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs index 71b6fdcfd874..4b2f695b5821 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.ICredentialResults))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Gets cluster user credentials of the connected cluster with a specified resource group and name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential", ApiVersion = "2022-10-01-preview")] public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs index a142f8e9eed3..e949a671e51e 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzConnectedKubernetes_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs index 98203d451b58..a59f48c7efa7 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2022-10-01-preview")] public partial class GetAzConnectedKubernetes_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs index db1939740efa..4eae29e09bc9 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to enumerate registered connected K8s clusters under a Resource Group")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters", ApiVersion = "2022-10-01-preview")] public partial class GetAzConnectedKubernetes_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs index d1451599dc8c..6088bee2cef1 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to enumerate registered connected K8s clusters under a Subscription")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters", ApiVersion = "2022-10-01-preview")] public partial class GetAzConnectedKubernetes_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs index b2648ca23ac7..e5fbb6ea0b5c 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM).")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2022-10-01-preview")] public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs index a678f7880957..f784532e0f21 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzConnectedKubernetes_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs index e4a141f20d94..5062463f8afd 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2022-10-01-preview")] public partial class RemoveAzConnectedKubernetes_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs index 54fd25a74d36..4249f7422a94 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to update certain properties of the connected cluster resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2022-10-01-preview")] public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs index b659bb65bb91..21fe5d3bf568 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to update certain properties of the connected cluster resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2022-10-01-preview")] public partial class UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs index 99838dcaaf4b..f00d32ad021b 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -33,6 +33,9 @@ public class ExportHelpMarkdown : PSCmdlet [ValidateNotNullOrEmpty] public string ExamplesFolder { get; set; } + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -41,7 +44,7 @@ protected override void ProcessRecord() var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); - WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); } catch (Exception ee) { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index 52e41b541bec..94b904b6189d 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -52,6 +52,9 @@ public class ExportProxyCmdlet : PSCmdlet [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] public SwitchParameter ExcludeDocs { get; set; } + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -163,7 +166,7 @@ protected override void ProcessRecord() var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; - WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder); + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); } } } diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index d09d581be78a..4ec0fef5e278 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerSh { internal static class MarkdownRenderer { - public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder) + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) { Directory.CreateDirectory(docsFolder); var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); @@ -69,18 +69,26 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod } sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); - sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); - foreach (var alias in markdownInfo.Aliases) + if (markdownInfo.Aliases.Any()) { - sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); } - if (markdownInfo.ComplexInterfaceInfos.Any()) + foreach (var alias in markdownInfo.Aliases) { - sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); } - foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + + if (AddComplexInterfaceInfo) { - sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + } sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 845cbd7c06b2..0b18e0529f19 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -191,12 +191,13 @@ public BeginOutput(VariantGroup variantGroup) : base(variantGroup) public string GetProcessCustomAttributesAtRuntime() { - return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) {Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ {Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) {Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) -{Indent}{Indent}}}"; +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } private string GetTelemetry() diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs index a586a5219447..05797a6082a3 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -48,6 +48,13 @@ public ProfileAttribute(params string[] profiles) } } + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Az.ConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Az.ConnectedKubernetes.md new file mode 100644 index 000000000000..1863e2d4ea37 --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Az.ConnectedKubernetes.md @@ -0,0 +1,28 @@ +--- +Module Name: Az.ConnectedKubernetes +Module Guid: d3467834-8989-4142-8c05-ab93c4bfa6eb +Download Help Link: https://learn.microsoft.com/powershell/module/az.connectedkubernetes +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.ConnectedKubernetes Module +## Description +Microsoft Azure PowerShell: ConnectedKubernetes cmdlets + +## Az.ConnectedKubernetes Cmdlets +### [Get-AzConnectedKubernetes](Get-AzConnectedKubernetes.md) +Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details. + +### [Get-AzConnectedKubernetesUserCredential](Get-AzConnectedKubernetesUserCredential.md) +Gets cluster user credentials of the connected cluster with a specified resource group and name. + +### [New-AzConnectedKubernetes](New-AzConnectedKubernetes.md) +API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). + +### [Remove-AzConnectedKubernetes](Remove-AzConnectedKubernetes.md) +Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). + +### [Update-AzConnectedKubernetes](Update-AzConnectedKubernetes.md) +API to update certain properties of the connected cluster resource + diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Get-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Get-AzConnectedKubernetes.md new file mode 100644 index 000000000000..d9caea2a555d --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Get-AzConnectedKubernetes.md @@ -0,0 +1,192 @@ +--- +external help file: +Module Name: Az.ConnectedKubernetes +online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes +schema: 2.0.0 +--- + +# Get-AzConnectedKubernetes + +## SYNOPSIS +Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details. + +## SYNTAX + +### List1 (Default) +``` +Get-AzConnectedKubernetes [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzConnectedKubernetes -ClusterName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzConnectedKubernetes -InputObject [-DefaultProfile ] + [] +``` + +### List +``` +Get-AzConnectedKubernetes -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details. + +## EXAMPLES + +### Example 1: Get all connected kubernetes under a subscription. +```powershell +Get-AzConnectedKubernetes +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +eastus azps_test_cluster_ahb azps_test_group +``` + +This command gets all connected kubernetes under a subscription. + +### Example 2: Get all connected kubernetes under the resource group. +```powershell +Get-AzConnectedKubernetes -ResourceGroupName azps_test_group +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +eastus azps_test_cluster_ahb azps_test_group +``` + +This command gets all connected kubernetes under the resource group. + +### Example 3: Get a connected kubernetes. +```powershell +Get-AzConnectedKubernetes -ResourceGroupName azps_test_group -Name azps_test_cluster +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +``` + +This command gets a connected kubernetes. + +### Example 4: Get a connected kubernetes by object. +```powershell +$conAks = Get-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group +Get-AzConnectedKubernetes -InputObject $conAks +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster_ahb azps_test_group +``` + +This command gets a connected kubernetes by object. + +## PARAMETERS + +### -ClusterName +The name of the Kubernetes cluster on which get is called. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Name + +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 +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +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 + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Get-AzConnectedKubernetesUserCredential.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Get-AzConnectedKubernetesUserCredential.md new file mode 100644 index 000000000000..5daaadf0d9b1 --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Get-AzConnectedKubernetesUserCredential.md @@ -0,0 +1,225 @@ +--- +external help file: +Module Name: Az.ConnectedKubernetes +online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesusercredential +schema: 2.0.0 +--- + +# Get-AzConnectedKubernetesUserCredential + +## SYNOPSIS +Gets cluster user credentials of the connected cluster with a specified resource group and name. + +## SYNTAX + +### ListExpanded (Default) +``` +Get-AzConnectedKubernetesUserCredential -ClusterName -ResourceGroupName + -AuthenticationMethod -ClientProxy [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### List +``` +Get-AzConnectedKubernetesUserCredential -ClusterName -ResourceGroupName + -Property [-SubscriptionId ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Gets cluster user credentials of the connected cluster with a specified resource group and name. + +## EXAMPLES + +### Example 1: Gets cluster user credentials of the connected cluster with a specified resource group and name. +```powershell +Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod AAD -ClientProxy +``` + +```output +HybridConnectionConfigExpirationTime : 1635508790 +HybridConnectionConfigHybridConnectionName : microsoft.kubernetes/connectedclusters/8d3bccced1f3ad1d0e01b03e87d1c8f8a312df7ff028e642512a7999542e46fc/1635497990523092736 +HybridConnectionConfigRelay : azgnrelay-eastus-l1 +HybridConnectionConfigToken : SharedAccessSignature sr=http%3A%2F%2Fazgnrelay-eastus-l1.servicebus.windows.net%2Fmicrosoft.kubernetes%2Fconnectedclusters%2F8d3bccced1f3ad1d0e01b03e87d1c8f8a312df7ff028e642512a7999542e46fc%2F1635497990523092736%2F&sig=wrukC6KAxVFb%2FmsdaTwSv3ChHo0hvTWjf5A80IZs2P4%3D&se=1635509390&skn=sender20211026 +Kubeconfig : {{ + "name": "KubeConfig", + "value": "YXBpVm***G9wDQo=" + }} +``` + +Gets cluster user credentials of the connected cluster with a specified resource group and name. + +### Example 2: Gets cluster user credentials of the connected cluster with a specified resource group and name. +```powershell +Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod Token -ClientProxy:$false +``` + +```output +HybridConnectionConfigExpirationTime : +HybridConnectionConfigHybridConnectionName : +HybridConnectionConfigRelay : +HybridConnectionConfigToken : +Kubeconfig : {{ + "name": "KubeConfig", + "value": "YXBpVm***G9wDQo=" + }} +``` + +Gets cluster user credentials of the connected cluster with a specified resource group and name. + +## PARAMETERS + +### -AuthenticationMethod +The mode of client authentication. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod +Parameter Sets: ListExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientProxy +Boolean value to indicate whether the request is for client side proxy or not + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: ListExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The name of the Kubernetes cluster on which get is called. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Name + +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 +``` + +### -Property +. +To construct, see NOTES section for PROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IListClusterUserCredentialProperties +Parameter Sets: List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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. + +```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 +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +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 + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IListClusterUserCredentialProperties + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.ICredentialResults + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/New-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/New-AzConnectedKubernetes.md new file mode 100644 index 000000000000..9fc140e3d494 --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/New-AzConnectedKubernetes.md @@ -0,0 +1,576 @@ +--- +external help file: +Module Name: Az.ConnectedKubernetes +online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes +schema: 2.0.0 +--- + +# New-AzConnectedKubernetes + +## SYNOPSIS +API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). + +## SYNTAX + +``` +New-AzConnectedKubernetes -ClusterName -ResourceGroupName -Location + [-ContainerLogPath ] [-DisableAutoUpgrade] [-HttpProxy ] [-HttpsProxy ] [-NoProxy ] + [-OnboardingTimeout ] [-ProxyCert ] [-SubscriptionId ] [-AcceptEULA] + [-AzureHybridBenefit ] [-CustomLocationsOid ] [-Distribution ] + [-DistributionVersion ] [-Infrastructure ] [-KubeConfig ] [-KubeContext ] + [-PrivateLinkScopeResourceId ] [-PrivateLinkState ] + [-ProvisioningState ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). + +## EXAMPLES + +### Example 1: Create a connected kubernetes. +```powershell +New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +``` + +This command creates a connected kubernetes. + +### Example 2: Create a connected kubernetes with parameters kubeConfig and kubeContext. +```powershell +New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +``` + +This command creates a connected kubernetes with parameters kubeConfig and kubeContext. + +### Example 3: Create a ConnectedKubernetes's AzureHybridBenefit. +```powershell +New-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 -PrivateLinkState 'Enabled' -Distribution "AKS_Management" -DistributionVersion "1.0" -PrivateLinkScopeResourceId "/subscriptions/{subscriptionId}/resourceGroups/azps_test_group/providers/Microsoft.HybridCompute/privateLinkScopes/azps-privatelinkscope" -infrastructure "azure_stack_hci" -ProvisioningState 'Succeeded' -AzureHybridBenefit 'True' +``` + +```output +I confirm I have an eligible Windows Server license with Azure Hybrid Benefit to apply this benefit to AKS on Azure Stack HCI or Windows Server. Visit https://aka.ms/ahb-aks for details. +[Y] Yes [N] No (default is "N"): Y + +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster_ahb azps_test_group +``` + +Create a ConnectedKubernetes's AzureHybridBenefit. + +### Example 4: Using [-AcceptEULA] will default to your acceptance of the terms of our legal agreement and create a connected kubernetes. +```powershell +New-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 -PrivateLinkState 'Enabled' -Distribution "AKS_Management" -DistributionVersion "1.0" -PrivateLinkScopeResourceId "/subscriptions/{subscriptionId}/resourceGroups/azps_test_group/providers/Microsoft.HybridCompute/privateLinkScopes/azps-privatelinkscope" -infrastructure "azure_stack_hci" -ProvisioningState 'Succeeded' -AzureHybridBenefit 'True' -AcceptEULA +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster_ahb azps_test_group +``` + +Using [-AcceptEULA] will default to your acceptance of the terms of our legal agreement and create a connected kubernetes. + +### Example 5: Create a connected kubernetes with parameters HttpProxy, HttpsProxy, NoProxy and Proxy. +```powershell +New-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 -HttpProxy "http://proxy-user:proxy-password@proxy-ip:port" -HttpsProxy "http://proxy-user:proxy-password@proxy-ip:port" -NoProxy "localhost,127.0.0.0/8,192.168.0.0/16,172.17.0.0/16,10.96.0.0/12,10.244.0.0/16,10.43.0.0/24,.svc" -Proxy "http://proxy-user:proxy-password@proxy-ip:port" +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster_ahb azps_test_group +``` + +This command creates a connected kubernetes with parameters HttpProxy, HttpsProxy, NoProxy and Proxy. + +### Example 6: Create a connected kubernetes with parameters HttpProxy, HttpsProxy, NoProxy, Proxy and ProxyCredential. +```powershell +$pwd = ConvertTo-SecureString "proxy-password" -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential ("proxy-user", $pwd) +New-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 -HttpProxy "http://proxy-user:proxy-password@proxy-ip:port" -HttpsProxy "http://proxy-user:proxy-password@proxy-ip:port" -NoProxy "localhost,127.0.0.0/8,192.168.0.0/16,172.17.0.0/16,10.96.0.0/12,10.244.0.0/16,10.43.0.0/24,.svc" -Proxy "http://proxy-ip:port" -ProxyCredential $cred +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster_ahb azps_test_group +``` + +This command creates a connected kubernetes with parameters HttpProxy, HttpsProxy, NoProxy, Proxy and ProxyCredential. + +### Example 7: Create a connected kubernetes and disable auto upgrade of arc agents. +```powershell +New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -DisableAutoUpgrade +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +``` + +This command creates a connected kubernetes and disable auto upgrade of arc agents. + +### Example 8: Create a connected kubernetes with custom onboarding timeout. +```powershell +New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -OnboardingTimeout 600 +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +``` + +This command creates a connected kubernetes with custom onboarding timeout. + +## PARAMETERS + +### -AcceptEULA +Accept EULA of ConnectedKubernetes, legal term will pop up without this parameter provided + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureHybridBenefit +Indicates whether Azure Hybrid Benefit is opted in + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The name of the Kubernetes cluster on which get is called. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Name + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContainerLogPath +Override the default container log path to enable fluent-bit logging. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomLocationsOid +OID of 'custom-locations' app. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```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 +``` + +### -DisableAutoUpgrade +Flag to disable auto upgrade of arc agents. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Distribution +The Kubernetes distribution running on this connected cluster. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DistributionVersion +The Kubernetes distribution version on this connected cluster. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpProxy +The http URI of the proxy server for the kubernetes cluster to use + +```yaml +Type: System.Uri +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpsProxy +The https URI of the proxy server for the kubernetes cluster to use + +```yaml +Type: System.Uri +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Infrastructure +The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KubeConfig +Path to the kube config file + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KubeContext +Kubconfig context from current machine + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoProxy +The comma-separated list of hostnames that should be excluded from the proxy server for the kubernetes cluster to use + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OnboardingTimeout +The time required (in seconds) for the arc-agent pods to be installed on the kubernetes cluster. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkScopeResourceId +The resource id of the private link scope this connected cluster is assigned to, if any. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkState +Property which describes the state of private link on a connected cluster resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProvisioningState +Provisioning state of the connected cluster resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProxyCert +The path to the certificate file for proxy or custom Certificate Authority. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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. + +```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 +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +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.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/README.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/README.md new file mode 100644 index 000000000000..6eed363d717e --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.ConnectedKubernetes` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.ConnectedKubernetes` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Remove-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Remove-AzConnectedKubernetes.md new file mode 100644 index 000000000000..fbfff122e747 --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Remove-AzConnectedKubernetes.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.ConnectedKubernetes +online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/remove-azconnectedkubernetes +schema: 2.0.0 +--- + +# Remove-AzConnectedKubernetes + +## SYNOPSIS +Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). + +## SYNTAX + +### Delete (Default) +``` +Remove-AzConnectedKubernetes -ClusterName -ResourceGroupName [-SubscriptionId ] + [-KubeConfig ] [-KubeContext ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzConnectedKubernetes -InputObject [-KubeConfig ] + [-KubeContext ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). + +## EXAMPLES + +### Example 1: Remove a connected kubernetes. +```powershell +Remove-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group +``` + +This command removes a connected kubernetes. + +### Example 2: Remove a connected kubernetes by object. +```powershell +Get-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group | Remove-AzConnectedKubernetes +``` + +This command removes a connected kubernetes by object. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The name of the Kubernetes cluster on which get is called. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Name + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```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 +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -KubeConfig +Path to the kube config file + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KubeContext +Kubconfig context from current machine + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +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: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +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 + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Update-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Update-AzConnectedKubernetes.md new file mode 100644 index 000000000000..c285890a444a --- /dev/null +++ b/src/ConnectedKubernetes/ConnectedKubernetes.Autorest/help/Update-AzConnectedKubernetes.md @@ -0,0 +1,289 @@ +--- +external help file: +Module Name: Az.ConnectedKubernetes +online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes +schema: 2.0.0 +--- + +# Update-AzConnectedKubernetes + +## SYNOPSIS +API to update certain properties of the connected cluster resource + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzConnectedKubernetes -ClusterName -ResourceGroupName [-SubscriptionId ] + [-AcceptEULA] [-AzureHybridBenefit ] [-Distribution ] + [-DistributionVersion ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzConnectedKubernetes -InputObject [-AcceptEULA] + [-AzureHybridBenefit ] [-Distribution ] [-DistributionVersion ] + [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +API to update certain properties of the connected cluster resource + +## EXAMPLES + +### Example 1: Update a connected kubernetes. +```powershell +Update-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Tag @{'key'='1'} +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +``` + +This command updates a connected kubernetes. + +### Example 2: Update a connected kubernetes by object. +```powershell +Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group | Update-AzConnectedKubernetes -Tag @{'key'='2'} +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster azps_test_group +``` + +This command updates a connected kubernetes by object. + +### Example 3: Update a ConnectedKubernetes's AzureHybridBenefit. +```powershell +Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Tag @{'key'='1'} -AzureHybridBenefit 'True' +``` + +```output +I confirm I have an eligible Windows Server license with Azure Hybrid Benefit to apply this benefit to AKS on Azure Stack HCI or Windows Server. Visit https://aka.ms/ahb-aks for details. +[Y] Yes [N] No (default is "N"): y + +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster_ahb azps_test_group +``` + +Update a ConnectedKubernetes's AzureHybridBenefit. + +### Example 4: Using [-AcceptEULA] will default to your acceptance of the terms of our legal agreement and update a ConnectedKubernetes's AzureHybridBenefit. +```powershell +Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Tag @{'key'='1'} -AzureHybridBenefit 'True' -AcceptEULA +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- +eastus azps_test_cluster_ahb azps_test_group +``` + +Using [-AcceptEULA] will default to your acceptance of the terms of our legal agreement and update a ConnectedKubernetes's AzureHybridBenefit. + +## PARAMETERS + +### -AcceptEULA +Accept EULA of ConnectedKubernetes, legal term will pop up without this parameter provided + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureHybridBenefit +Indicates whether Azure Hybrid Benefit is opted in + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The name of the Kubernetes cluster on which get is called. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: Name + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```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 +``` + +### -Distribution +Represents the distribution of the connected cluster + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DistributionVersion +Represents the Kubernetes distribution version on this connected cluster. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +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.ConnectedKubernetes.Models.IConnectedKubernetesIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +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 + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20221001Preview.IConnectedCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedKubernetes/ConnectedKubernetes/Az.ConnectedKubernetes.psd1 b/src/ConnectedKubernetes/ConnectedKubernetes/Az.ConnectedKubernetes.psd1 index 708641e8c92e..74de1f0e136a 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes/Az.ConnectedKubernetes.psd1 +++ b/src/ConnectedKubernetes/ConnectedKubernetes/Az.ConnectedKubernetes.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/5/2023 +# Generated on: 1/19/2024 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.1'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.15.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = diff --git a/src/ConnectedKubernetes/ConnectedKubernetes/ChangeLog.md b/src/ConnectedKubernetes/ConnectedKubernetes/ChangeLog.md index 0ed7c486431a..253303ea9c5b 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes/ChangeLog.md +++ b/src/ConnectedKubernetes/ConnectedKubernetes/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Fixed custom location enable flag issue. ## Version 0.10.0 * Added support for custom locations id and correlation Id. diff --git a/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetes.md index 0c17c0ff73de..42266b63bb3a 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetes.md +++ b/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetes.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedKubernetes-help.xml Module Name: Az.ConnectedKubernetes online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes schema: 2.0.0 @@ -23,16 +23,16 @@ Get-AzConnectedKubernetes -ClusterName -ResourceGroupName [-Su [-DefaultProfile ] [] ``` -### GetViaIdentity +### List ``` -Get-AzConnectedKubernetes -InputObject [-DefaultProfile ] +Get-AzConnectedKubernetes -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] ``` -### List +### GetViaIdentity ``` -Get-AzConnectedKubernetes -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] +Get-AzConnectedKubernetes -InputObject [-DefaultProfile ] + [] ``` ## DESCRIPTION @@ -165,7 +165,7 @@ The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List, List1 +Parameter Sets: List1, Get, List Aliases: Required: False @@ -202,4 +202,3 @@ To create the parameters described below, construct a hash table containing the - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS - diff --git a/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetesUserCredential.md b/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetesUserCredential.md index e1e1b7c55077..4b3384e8c281 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetesUserCredential.md +++ b/src/ConnectedKubernetes/ConnectedKubernetes/help/Get-AzConnectedKubernetesUserCredential.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedKubernetes-help.xml Module Name: Az.ConnectedKubernetes online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesusercredential schema: 2.0.0 @@ -15,15 +15,15 @@ Gets cluster user credentials of the connected cluster with a specified resource ### ListExpanded (Default) ``` Get-AzConnectedKubernetesUserCredential -ClusterName -ResourceGroupName - -AuthenticationMethod -ClientProxy [-SubscriptionId ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-SubscriptionId ] -AuthenticationMethod [-ClientProxy] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### List ``` Get-AzConnectedKubernetesUserCredential -ClusterName -ResourceGroupName - -Property [-SubscriptionId ] [-DefaultProfile ] - [-Confirm] [-WhatIf] [] + [-SubscriptionId ] -Property [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -233,4 +233,3 @@ To create the parameters described below, construct a hash table containing the - `ClientProxy `: Boolean value to indicate whether the request is for client side proxy or not ## RELATED LINKS - diff --git a/src/ConnectedKubernetes/ConnectedKubernetes/help/New-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes/help/New-AzConnectedKubernetes.md index d83f5ee4d6f0..7bdf4f0677c3 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes/help/New-AzConnectedKubernetes.md +++ b/src/ConnectedKubernetes/ConnectedKubernetes/help/New-AzConnectedKubernetes.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedKubernetes-help.xml Module Name: Az.ConnectedKubernetes online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes schema: 2.0.0 @@ -13,14 +13,14 @@ API to register a new Kubernetes cluster and create a tracked resource in Azure ## SYNTAX ``` -New-AzConnectedKubernetes -ClusterName -ResourceGroupName -Location - [-ContainerLogPath ] [-DisableAutoUpgrade] [-HttpProxy ] [-HttpsProxy ] [-NoProxy ] - [-OnboardingTimeout ] [-ProxyCert ] [-SubscriptionId ] [-AcceptEULA] - [-AzureHybridBenefit ] [-CustomLocationsOid ] [-Distribution ] - [-DistributionVersion ] [-Infrastructure ] [-KubeConfig ] [-KubeContext ] - [-PrivateLinkScopeResourceId ] [-PrivateLinkState ] - [-ProvisioningState ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] +New-AzConnectedKubernetes -ClusterName -ResourceGroupName [-SubscriptionId ] + [-HttpProxy ] [-HttpsProxy ] [-NoProxy ] [-ProxyCert ] [-OnboardingTimeout ] + [-DisableAutoUpgrade] [-ContainerLogPath ] -Location [-KubeConfig ] + [-KubeContext ] [-AzureHybridBenefit ] [-Distribution ] + [-DistributionVersion ] [-Infrastructure ] [-PrivateLinkScopeResourceId ] + [-PrivateLinkState ] [-ProvisioningState ] [-Tag ] + [-CustomLocationsOid ] [-AcceptEULA] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -85,7 +85,7 @@ Using [-AcceptEULA] will default to your acceptance of the terms of our legal ag ### Example 5: Create a connected kubernetes with parameters HttpProxy, HttpsProxy, NoProxy and Proxy. ```powershell -New-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 -HttpProxy "http://proxy-user:proxy-password@proxy-ip:port" -HttpsProxy "http://proxy-user:proxy-password@proxy-ip:port" -NoProxy "localhost,127.0.0.0/8,192.168.0.0/16,172.17.0.0/16,10.96.0.0/12,10.244.0.0/16,10.43.0.0/24,.svc" -Proxy "http://proxy-user:proxy-password@proxy-ip:port" +New-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 -HttpProxy "http://proxy-user:proxy-password@proxy-ip:port" -HttpsProxy "http://proxy-user:proxy-password@proxy-ip:port" -NoProxy "localhost,127.0.0.0/8,192.168.0.0/16,172.17.0.0/16,10.96.0.0/12,10.244.0.0/16,10.43.0.0/24,.svc" -Proxy "http://proxy-user:proxy-password@proxy-ip:port" ``` ```output @@ -575,4 +575,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ALIASES ## RELATED LINKS - diff --git a/src/ConnectedKubernetes/ConnectedKubernetes/help/Remove-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes/help/Remove-AzConnectedKubernetes.md index 69854a4a6b4e..40d343999a02 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes/help/Remove-AzConnectedKubernetes.md +++ b/src/ConnectedKubernetes/ConnectedKubernetes/help/Remove-AzConnectedKubernetes.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedKubernetes-help.xml Module Name: Az.ConnectedKubernetes online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/remove-azconnectedkubernetes schema: 2.0.0 @@ -16,13 +16,13 @@ Delete a connected cluster, removing the tracked resource in Azure Resource Mana ``` Remove-AzConnectedKubernetes -ClusterName -ResourceGroupName [-SubscriptionId ] [-KubeConfig ] [-KubeContext ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-Confirm] [-WhatIf] [] + [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedKubernetes -InputObject [-KubeConfig ] - [-KubeContext ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [-KubeContext ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] ``` @@ -257,4 +257,3 @@ To create the parameters described below, construct a hash table containing the - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS - diff --git a/src/ConnectedKubernetes/ConnectedKubernetes/help/Update-AzConnectedKubernetes.md b/src/ConnectedKubernetes/ConnectedKubernetes/help/Update-AzConnectedKubernetes.md index 7bd5ceca63ee..95a26829a777 100644 --- a/src/ConnectedKubernetes/ConnectedKubernetes/help/Update-AzConnectedKubernetes.md +++ b/src/ConnectedKubernetes/ConnectedKubernetes/help/Update-AzConnectedKubernetes.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedKubernetes-help.xml Module Name: Az.ConnectedKubernetes online version: https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes schema: 2.0.0 @@ -15,16 +15,17 @@ API to update certain properties of the connected cluster resource ### UpdateExpanded (Default) ``` Update-AzConnectedKubernetes -ClusterName -ResourceGroupName [-SubscriptionId ] - [-AcceptEULA] [-AzureHybridBenefit ] [-Distribution ] - [-DistributionVersion ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [-AzureHybridBenefit ] [-AcceptEULA] [-Distribution ] + [-DistributionVersion ] [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` -Update-AzConnectedKubernetes -InputObject [-AcceptEULA] - [-AzureHybridBenefit ] [-Distribution ] [-DistributionVersion ] - [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +Update-AzConnectedKubernetes -InputObject + [-AzureHybridBenefit ] [-AcceptEULA] [-Distribution ] + [-DistributionVersion ] [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -299,4 +300,3 @@ To create the parameters described below, construct a hash table containing the - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS -