diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj
index eaa96e434073..f6b7fc97d562 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj
@@ -2,9 +2,9 @@
ConnectedKubernetes
ConnectedKubernetes
+ ConnectedKubernetes.Autorest
-
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml
index e75f86d1286e..9480d7f8421c 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml
@@ -2,155 +2,12 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ClusterName
-
-
- ResourceGroupName
-
-
- SubscriptionId
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfile
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfile#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code
-
-
- Message
-
-
- Target
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.Resource
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.Resource
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResource
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
- Location
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTags
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTags
-
-
-
-
-
-
-
-
-
-
-
- Item
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfile
-
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfile
-
-
-
-
-
-
@@ -161,9 +18,6 @@
-
- AdminGroupObjectID
-
EnableAzureRbac
@@ -176,9 +30,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentError
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentError
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentError
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentError#Multiple
@@ -216,9 +70,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfile
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfile
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfile
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfile#Multiple
@@ -250,9 +104,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurations
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurations
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurations
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurations#Multiple
@@ -272,9 +126,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettings
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettings
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettings
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettings#Multiple
@@ -294,9 +148,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettings
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettings
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettings
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettings#Multiple
@@ -316,9 +170,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster#Multiple
@@ -356,9 +210,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentity
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentity#Multiple
@@ -384,9 +238,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterList
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterList
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList#Multiple
@@ -406,9 +260,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchProperties
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchProperties#Multiple
@@ -440,9 +294,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTags
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTags
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTags
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTags#Multiple
@@ -462,9 +316,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterProperties
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterProperties#Multiple
@@ -574,9 +428,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties#Multiple
@@ -596,9 +450,43 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResult
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResult
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ClusterName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResult#Multiple
@@ -624,9 +512,43 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Gateway
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Gateway
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Gateway
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Gateway#Multiple
@@ -652,9 +574,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfig
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfig
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfig
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfig#Multiple
@@ -704,9 +626,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ListClusterUserCredentialProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ListClusterUserCredentialProperties
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ListClusterUserCredentialProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ListClusterUserCredentialProperties#Multiple
@@ -732,9 +654,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfile
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfile
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfile
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfile#Multiple
@@ -766,9 +688,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Operation
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Operation#Multiple
@@ -788,9 +710,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplay#Multiple
@@ -828,9 +750,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationList
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationList
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationList
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationList#Multiple
@@ -850,9 +772,31 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Resource
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Resource#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentity#Multiple
@@ -872,9 +816,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponent
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponent
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponent
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponent#Multiple
@@ -906,9 +850,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemData
- Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemData#Multiple
@@ -957,5 +901,55 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResource#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTags#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
\ No newline at end of file
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1
index 99fc4deda480..301b14055119 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1
@@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ConnectedKubernetes.private.dll'
FormatsToProcess = './Az.ConnectedKubernetes.format.ps1xml'
- FunctionsToExport = 'Get-AzConnectedKubernetes', 'Get-AzConnectedKubernetesUserCredential', 'New-AzConnectedKubernetes', 'Remove-AzConnectedKubernetes', 'Set-AzConnectedKubernetes', 'Update-AzConnectedKubernetes', '*'
- AliasesToExport = '*'
+ FunctionsToExport = 'Get-AzConnectedKubernetes', 'Get-AzConnectedKubernetesUserCredential', 'New-AzConnectedKubernetes', 'Remove-AzConnectedKubernetes', 'Set-AzConnectedKubernetes', 'Update-AzConnectedKubernetes'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedKubernetes'
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs
index 61affcdc5dd2..22e6f3365e1c 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs
@@ -1,28 +1,32 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
+// 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,
+// 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.
using System;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Microsoft Azure Powershell - ConnectedKubernetes")]
-[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
-[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
-[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
+[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
+[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ConnectedKubernetes")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.14.0")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.14.0")]
+[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
+[assembly: System.CLSCompliantAttribute(false)]
+
+
+
+
+
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: Guid("57c436a1-0e82-42cb-a1a6-f727667af406")]
-[assembly: AssemblyVersion("0.14.0")]
-[assembly: AssemblyFileVersion("0.14.0")]
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1
index 7e6737533a71..fcf07d40d2e0 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1
@@ -32,7 +32,7 @@ Get-AzConnectedKubernetes -InputObject $conAks
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes
#>
function Get-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -78,7 +78,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -137,6 +136,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -161,9 +169,7 @@ begin {
List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List';
List1 = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -177,6 +183,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1
index 43ac8508ea22..8033e5f04905 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1
@@ -25,22 +25,22 @@ Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -Resource
Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod Token -ClientProxy:$false
.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults
.Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
PROPERTY : .
- AuthenticationMethod : The mode of client authentication.
+ AuthenticationMethod : The mode of client authentication.
ClientProxy : Boolean value to indicate whether the request is for client side proxy or not
.Link
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesusercredential
#>
function Get-AzConnectedKubernetesUserCredential {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults])]
[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -66,15 +66,14 @@ param(
[Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties]
# .
- # To construct, see NOTES section for PROPERTY properties and create a hash table.
${Property},
[Parameter(ParameterSetName='ListExpanded', Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Token", "AAD")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod]
+ [System.String]
# The mode of client authentication.
${AuthenticationMethod},
@@ -84,6 +83,18 @@ param(
# Boolean value to indicate whether the request is for client side proxy or not
${ClientProxy},
+ [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the List operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='ListViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Json string supplied to the List operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -140,6 +151,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -161,10 +181,10 @@ begin {
$mapping = @{
List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_List';
ListExpanded = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListExpanded';
+ ListViaJsonFilePath = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonFilePath';
+ ListViaJsonString = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonString';
}
- if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('List', 'ListExpanded', 'ListViaJsonFilePath', 'ListViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -178,6 +198,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1
index 672ba2724202..0ea36a5fc64a 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1
@@ -39,12 +39,21 @@ New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps
New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -OnboardingTimeout 600
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource.
+ [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource.
+ [Type ]: Type of the system extension
+ [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource.
.Link
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes
#>
function New-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -116,6 +125,46 @@ param(
# The geo-location where the resource lives
${Location},
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String[]]
+ # The list of AAD group object IDs that will have admin role of the cluster.
+ ${AadProfileAdminGroupObjectID},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Whether to enable Azure RBAC for Kubernetes authorization.
+ ${AadProfileEnableAzureRbac},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The AAD tenant ID to use for authentication.
+ # If not specified, will use the tenant of the deployment subscription.
+ ${AadProfileTenantId},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]]
+ # List of arc agentry and system components errors on the cluster resource.
+ ${ArcAgentProfileAgentError},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Version of the Arc agents to be installed on the cluster resource
+ ${ArcAgentProfileDesiredAgentVersion},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]]
+ # List of system extensions that are installed on the cluster resource.
+ ${ArcAgentProfileSystemComponent},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
@@ -129,9 +178,9 @@ param(
${KubeContext},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit]
+ [System.String]
# Indicates whether Azure Hybrid Benefit is opted in
${AzureHybridBenefit},
@@ -147,35 +196,55 @@ param(
# The Kubernetes distribution version on this connected cluster.
${DistributionVersion},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Indicates whether the gateway for arc router connectivity is enabled.
+ ${GatewayEnabled},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.
${Infrastructure},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The kind of connected cluster.
+ ${Kind},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
+ # This is populated only if privateLinkState is enabled.
# The resource id of the private link scope this connected cluster is assigned to, if any.
${PrivateLinkScopeResourceId},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState]
+ [System.String]
# Property which describes the state of private link on a connected cluster resource.
${PrivateLinkState},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState]
+ [System.String]
# Provisioning state of the connected cluster resource.
${ProvisioningState},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -215,7 +284,8 @@ param(
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter()]
@@ -253,14 +323,14 @@ param(
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Uri]
- # The URI of the proxy server for host os to use
+ # The URI for the proxy server to use
${Proxy},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Management.Automation.PSCredential]
- # The credential of the proxy server for host os to use
+ # Credentials for a proxy server to use for the remote call
${ProxyCredential},
[Parameter(DontShow)]
@@ -295,6 +365,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -316,9 +395,7 @@ begin {
$mapping = @{
CreateExpanded = 'Az.ConnectedKubernetes.custom\New-AzConnectedKubernetes';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -332,6 +409,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1
index 0713b3726ac9..35e04c47c79a 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -25,22 +25,22 @@ Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -Resource
Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod Token -ClientProxy:$false
.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults
.Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
PROPERTY : .
- AuthenticationMethod : The mode of client authentication.
+ AuthenticationMethod : The mode of client authentication.
ClientProxy : Boolean value to indicate whether the request is for client side proxy or not
.Link
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesusercredential
#>
function Get-AzConnectedKubernetesUserCredential {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults])]
[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -66,15 +66,14 @@ param(
[Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties]
# .
- # To construct, see NOTES section for PROPERTY properties and create a hash table.
${Property},
[Parameter(ParameterSetName='ListExpanded', Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Token", "AAD")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod]
+ [System.String]
# The mode of client authentication.
${AuthenticationMethod},
@@ -84,6 +83,18 @@ param(
# Boolean value to indicate whether the request is for client side proxy or not
${ClientProxy},
+ [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the List operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='ListViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Json string supplied to the List operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -140,6 +151,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -161,10 +181,10 @@ begin {
$mapping = @{
List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_List';
ListExpanded = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListExpanded';
+ ListViaJsonFilePath = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonFilePath';
+ ListViaJsonString = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonString';
}
- if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('List', 'ListExpanded', 'ListViaJsonFilePath', 'ListViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -178,6 +198,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -239,7 +262,7 @@ Get-AzConnectedKubernetes -InputObject $conAks
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -254,7 +277,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes
#>
function Get-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -285,7 +308,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -344,6 +366,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -368,9 +399,7 @@ begin {
List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List';
List1 = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -384,6 +413,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -452,12 +484,21 @@ New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps
New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -OnboardingTimeout 600
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource.
+ [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource.
+ [Type ]: Type of the system extension
+ [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource.
.Link
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes
#>
function New-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -529,6 +570,46 @@ param(
# The geo-location where the resource lives
${Location},
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String[]]
+ # The list of AAD group object IDs that will have admin role of the cluster.
+ ${AadProfileAdminGroupObjectID},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Whether to enable Azure RBAC for Kubernetes authorization.
+ ${AadProfileEnableAzureRbac},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The AAD tenant ID to use for authentication.
+ # If not specified, will use the tenant of the deployment subscription.
+ ${AadProfileTenantId},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]]
+ # List of arc agentry and system components errors on the cluster resource.
+ ${ArcAgentProfileAgentError},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Version of the Arc agents to be installed on the cluster resource
+ ${ArcAgentProfileDesiredAgentVersion},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]]
+ # List of system extensions that are installed on the cluster resource.
+ ${ArcAgentProfileSystemComponent},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
@@ -542,9 +623,9 @@ param(
${KubeContext},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit]
+ [System.String]
# Indicates whether Azure Hybrid Benefit is opted in
${AzureHybridBenefit},
@@ -560,35 +641,55 @@ param(
# The Kubernetes distribution version on this connected cluster.
${DistributionVersion},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Indicates whether the gateway for arc router connectivity is enabled.
+ ${GatewayEnabled},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.
${Infrastructure},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The kind of connected cluster.
+ ${Kind},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
+ # This is populated only if privateLinkState is enabled.
# The resource id of the private link scope this connected cluster is assigned to, if any.
${PrivateLinkScopeResourceId},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState]
+ [System.String]
# Property which describes the state of private link on a connected cluster resource.
${PrivateLinkState},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState]
+ [System.String]
# Provisioning state of the connected cluster resource.
${ProvisioningState},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -628,7 +729,8 @@ param(
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter()]
@@ -666,14 +768,14 @@ param(
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Uri]
- # The URI of the proxy server for host os to use
+ # The URI for the proxy server to use
${Proxy},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Management.Automation.PSCredential]
- # The credential of the proxy server for host os to use
+ # Credentials for a proxy server to use for the remote call
${ProxyCredential},
[Parameter(DontShow)]
@@ -708,6 +810,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -729,9 +840,7 @@ begin {
$mapping = @{
CreateExpanded = 'Az.ConnectedKubernetes.custom\New-AzConnectedKubernetes';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -745,6 +854,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -807,7 +919,7 @@ COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
-INPUTOBJECT : Identity Parameter
+INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
[ClusterName ]: The name of the Kubernetes cluster on which get is called.
[Id ]: Resource identity path
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
@@ -932,6 +1044,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -954,9 +1075,7 @@ begin {
Delete = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
DeleteViaIdentity = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -970,6 +1089,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1049,60 +1171,66 @@ Set-AzConnectedKubernetes -InputObject $inputObject
Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId | Set-AzConnectedKubernetes -WorkloadIdentityEnabled:$false
.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource.
+ [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource.
+ [Type ]: Type of the system extension
+ [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource.
+
+ARCAGENTRYCONFIGURATION : Configuration settings for customizing the behavior of the connected cluster.
+ [Feature ]: Specifies the name of the feature for the configuration setting.
+ [ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information.
+ [(Any) ]: This indicates any property can be added to this object.
+ [Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information.
+ [(Any) ]: This indicates any property can be added to this object.
+
INPUTOBJECT :
- Location : The geo-location where the resource lives
AgentPublicKeyCertificate : Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
- IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.
+ IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.
+ [Location ]: The geo-location where the resource lives
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
- [AadProfileAdminGroupObjectID ]: The list of AAD group object IDs that will have admin role of the cluster.
+ [AadProfileAdminGroupObjectID >]: The list of AAD group object IDs that will have admin role of the cluster.
[AadProfileEnableAzureRbac ]: Whether to enable Azure RBAC for Kubernetes authorization.
[AadProfileTenantId ]: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.
- [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.
- [ArcAgentProfileAgentError ]: List of arc agentry and system components errors on the cluster resource.
+ [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.
+ [ArcAgentProfileAgentError >]: List of arc agentry and system components errors on the cluster resource.
[ArcAgentProfileDesiredAgentVersion ]: Version of the Arc agents to be installed on the cluster resource
- [ArcAgentProfileSystemComponent ]: List of system extensions that are installed on the cluster resource.
+ [ArcAgentProfileSystemComponent >]: List of system extensions that are installed on the cluster resource.
[MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource.
[Type ]: Type of the system extension
[UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource.
- [ArcAgentryConfiguration ]: Configuration settings for customizing the behavior of the connected cluster.
+ [ArcAgentryConfiguration >]: Configuration settings for customizing the behavior of the connected cluster.
[Feature ]: Specifies the name of the feature for the configuration setting.
[ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information.
[(Any) ]: This indicates any property can be added to this object.
[Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information.
[(Any) ]: This indicates any property can be added to this object.
- [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in
+ [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in
[Distribution ]: The Kubernetes distribution running on this connected cluster.
[DistributionVersion ]: The Kubernetes distribution version on this connected cluster.
[GatewayEnabled ]: Indicates whether the gateway for arc router connectivity is enabled.
[GatewayResourceId ]: The resource ID of the gateway used for the Arc router feature.
[Infrastructure ]: The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.
- [Kind ]: The kind of connected cluster.
+ [Kind ]: The kind of connected cluster.
[OidcIssuerProfileEnabled ]: Whether to enable oidc issuer for workload identity integration.
[OidcIssuerProfileSelfHostedIssuerUrl ]: The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature.
[PrivateLinkScopeResourceId ]: This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster is assigned to, if any.
- [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource.
- [ProvisioningState ]: Provisioning state of the connected cluster resource.
- [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
- [SystemDataCreatedBy ]: The identity that created the resource.
- [SystemDataCreatedByType ]: The type of identity that created the resource.
- [SystemDataLastModifiedAt ]: The timestamp of resource modification (UTC).
- [SystemDataLastModifiedBy ]: The identity that last modified the resource.
- [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+ [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource.
+ [ProvisioningState ]: Provisioning state of the connected cluster resource.
[WorkloadIdentityEnabled ]: Whether to enable or disable the workload identity Webhook
.Link
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/set-azconnectedkubernetes
#>
function Set-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='SetExpanded', Mandatory)]
@@ -1130,66 +1258,79 @@ param(
# The ID of the target subscription.
${SubscriptionId},
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Nullable[System.Boolean]]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
+
+ [Parameter(ParameterSetName='SetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)]
+ [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The geo-location where the resource lives
+ ${Location},
+
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.Uri]
- # The http URI of the proxy server for the kubernetes cluster to use
- ${HttpProxy},
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String[]]
+ # The list of AAD group object IDs that will have admin role of the cluster.
+ ${AadProfileAdminGroupObjectID},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.Uri]
- # The https URI of the proxy server for the kubernetes cluster to use
- ${HttpsProxy},
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Whether to enable Azure RBAC for Kubernetes authorization.
+ ${AadProfileEnableAzureRbac},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
- # The comma-separated list of hostnames that should be excluded from the proxy server for the kubernetes cluster to use
- ${NoProxy},
+ # The AAD tenant ID to use for authentication.
+ # If not specified, will use the tenant of the deployment subscription.
+ ${AadProfileTenantId},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
- # The path to the certificate file for proxy or custom Certificate Authority.
- ${ProxyCert},
+ # Indicates whether the Arc agents on the be upgraded automatically to the latest version.
+ # Defaults to Enabled.
+ ${ArcAgentProfileAgentAutoUpgrade},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.Management.Automation.SwitchParameter]
- # Flag to disable auto upgrade of arc agents.
- ${DisableAutoUpgrade},
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]]
+ # List of arc agentry and system components errors on the cluster resource.
+ ${ArcAgentProfileAgentError},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.String]
- # Override the default container log path to enable fluent-bit logging.
- ${ContainerLogPath},
-
- [Parameter(ParameterSetName='SetExpanded', Mandatory)]
- [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)]
- [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
- # The geo-location where the resource lives
- ${Location},
+ # Version of the Arc agents to be installed on the cluster resource
+ ${ArcAgentProfileDesiredAgentVersion},
[Parameter()]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [System.String]
- # Path to the kube config file
- ${KubeConfig},
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]]
+ # List of system extensions that are installed on the cluster resource.
+ ${ArcAgentProfileSystemComponent},
[Parameter()]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [System.String]
- # Kubconfig context from current machine
- ${KubeContext},
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]]
+ # Configuration settings for customizing the behavior of the connected cluster.
+ ${ArcAgentryConfiguration},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit]
+ [System.String]
# Indicates whether Azure Hybrid Benefit is opted in
${AzureHybridBenefit},
@@ -1205,35 +1346,49 @@ param(
# The Kubernetes distribution version on this connected cluster.
${DistributionVersion},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Indicates whether the gateway for arc router connectivity is enabled.
+ ${GatewayEnabled},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.
${Infrastructure},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The kind of connected cluster.
+ ${Kind},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
+ # This is populated only if privateLinkState is enabled.
# The resource id of the private link scope this connected cluster is assigned to, if any.
${PrivateLinkScopeResourceId},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState]
+ [System.String]
# Property which describes the state of private link on a connected cluster resource.
${PrivateLinkState},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState]
+ [System.String]
# Provisioning state of the connected cluster resource.
${ProvisioningState},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -1259,7 +1414,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.Management.Automation.SwitchParameter]
- # Enable the workload identity Webhook
+ # Whether to enable or disable the workload identity Webhook
${WorkloadIdentityEnabled},
[Parameter()]
@@ -1297,8 +1452,8 @@ param(
[Parameter(ParameterSetName='SetDisableGateway', Mandatory, ValueFromPipeline)]
[Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster]
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster]
+ #
${InputObject},
[Parameter()]
@@ -1306,7 +1461,8 @@ param(
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter()]
@@ -1344,14 +1500,14 @@ param(
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Uri]
- # The URI of the proxy server for host os to use
+ # The URI for the proxy server to use
${Proxy},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Management.Automation.PSCredential]
- # The credential of the proxy server for host os to use
+ # Credentials for a proxy server to use for the remote call
${ProxyCredential},
[Parameter(DontShow)]
@@ -1368,6 +1524,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1394,9 +1559,7 @@ begin {
SetDisableGateway = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes';
Set = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes';
}
- if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -1410,6 +1573,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1470,7 +1636,7 @@ Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupNa
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -1485,10 +1651,12 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes
#>
function Update-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Alias('Name')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[System.String]
@@ -1496,6 +1664,8 @@ param(
${ClusterName},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[System.String]
# The name of the resource group.
@@ -1503,6 +1673,8 @@ param(
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -1513,13 +1685,13 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit]
+ [System.String]
# Indicates whether Azure Hybrid Benefit is opted in
${AzureHybridBenefit},
@@ -1529,31 +1701,47 @@ param(
# Accept EULA of ConnectedKubernetes, legal term will pop up without this parameter provided
${AcceptEULA},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# Represents the distribution of the connected cluster
${Distribution},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# Represents the Kubernetes distribution version on this connected cluster.
${DistributionVersion},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter(DontShow)]
@@ -1603,6 +1791,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1623,11 +1820,11 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ UpdateViaJsonString = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ UpdateViaJsonFilePath = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded', 'UpdateViaJsonString', 'UpdateViaJsonFilePath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -1641,6 +1838,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1
index 48c98492f24b..55aac7aa563d 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1
@@ -33,7 +33,7 @@ COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
-INPUTOBJECT : Identity Parameter
+INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
[ClusterName ]: The name of the Kubernetes cluster on which get is called.
[Id ]: Resource identity path
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
@@ -158,6 +158,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -180,9 +189,7 @@ begin {
Delete = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
DeleteViaIdentity = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -196,6 +203,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1
index b9df301da669..d468be8c4106 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1
@@ -50,60 +50,66 @@ Set-AzConnectedKubernetes -InputObject $inputObject
Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId | Set-AzConnectedKubernetes -WorkloadIdentityEnabled:$false
.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource.
+ [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource.
+ [Type ]: Type of the system extension
+ [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource.
+
+ARCAGENTRYCONFIGURATION : Configuration settings for customizing the behavior of the connected cluster.
+ [Feature ]: Specifies the name of the feature for the configuration setting.
+ [ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information.
+ [(Any) ]: This indicates any property can be added to this object.
+ [Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information.
+ [(Any) ]: This indicates any property can be added to this object.
+
INPUTOBJECT :
- Location : The geo-location where the resource lives
AgentPublicKeyCertificate : Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
- IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.
+ IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.
+ [Location ]: The geo-location where the resource lives
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
- [AadProfileAdminGroupObjectID ]: The list of AAD group object IDs that will have admin role of the cluster.
+ [AadProfileAdminGroupObjectID >]: The list of AAD group object IDs that will have admin role of the cluster.
[AadProfileEnableAzureRbac ]: Whether to enable Azure RBAC for Kubernetes authorization.
[AadProfileTenantId ]: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.
- [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.
- [ArcAgentProfileAgentError ]: List of arc agentry and system components errors on the cluster resource.
+ [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.
+ [ArcAgentProfileAgentError >]: List of arc agentry and system components errors on the cluster resource.
[ArcAgentProfileDesiredAgentVersion ]: Version of the Arc agents to be installed on the cluster resource
- [ArcAgentProfileSystemComponent ]: List of system extensions that are installed on the cluster resource.
+ [ArcAgentProfileSystemComponent >]: List of system extensions that are installed on the cluster resource.
[MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource.
[Type ]: Type of the system extension
[UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource.
- [ArcAgentryConfiguration ]: Configuration settings for customizing the behavior of the connected cluster.
+ [ArcAgentryConfiguration >]: Configuration settings for customizing the behavior of the connected cluster.
[Feature ]: Specifies the name of the feature for the configuration setting.
[ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information.
[(Any) ]: This indicates any property can be added to this object.
[Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information.
[(Any) ]: This indicates any property can be added to this object.
- [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in
+ [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in
[Distribution ]: The Kubernetes distribution running on this connected cluster.
[DistributionVersion ]: The Kubernetes distribution version on this connected cluster.
[GatewayEnabled ]: Indicates whether the gateway for arc router connectivity is enabled.
[GatewayResourceId ]: The resource ID of the gateway used for the Arc router feature.
[Infrastructure ]: The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.
- [Kind ]: The kind of connected cluster.
+ [Kind ]: The kind of connected cluster.
[OidcIssuerProfileEnabled ]: Whether to enable oidc issuer for workload identity integration.
[OidcIssuerProfileSelfHostedIssuerUrl ]: The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature.
[PrivateLinkScopeResourceId ]: This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster is assigned to, if any.
- [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource.
- [ProvisioningState ]: Provisioning state of the connected cluster resource.
- [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
- [SystemDataCreatedBy ]: The identity that created the resource.
- [SystemDataCreatedByType ]: The type of identity that created the resource.
- [SystemDataLastModifiedAt ]: The timestamp of resource modification (UTC).
- [SystemDataLastModifiedBy ]: The identity that last modified the resource.
- [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+ [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource.
+ [ProvisioningState ]: Provisioning state of the connected cluster resource.
[WorkloadIdentityEnabled ]: Whether to enable or disable the workload identity Webhook
.Link
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/set-azconnectedkubernetes
#>
function Set-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='SetExpanded', Mandatory)]
@@ -131,66 +137,79 @@ param(
# The ID of the target subscription.
${SubscriptionId},
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Nullable[System.Boolean]]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
+
+ [Parameter(ParameterSetName='SetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)]
+ [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The geo-location where the resource lives
+ ${Location},
+
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.Uri]
- # The http URI of the proxy server for the kubernetes cluster to use
- ${HttpProxy},
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String[]]
+ # The list of AAD group object IDs that will have admin role of the cluster.
+ ${AadProfileAdminGroupObjectID},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.Uri]
- # The https URI of the proxy server for the kubernetes cluster to use
- ${HttpsProxy},
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Whether to enable Azure RBAC for Kubernetes authorization.
+ ${AadProfileEnableAzureRbac},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
- # The comma-separated list of hostnames that should be excluded from the proxy server for the kubernetes cluster to use
- ${NoProxy},
+ # The AAD tenant ID to use for authentication.
+ # If not specified, will use the tenant of the deployment subscription.
+ ${AadProfileTenantId},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
- # The path to the certificate file for proxy or custom Certificate Authority.
- ${ProxyCert},
+ # Indicates whether the Arc agents on the be upgraded automatically to the latest version.
+ # Defaults to Enabled.
+ ${ArcAgentProfileAgentAutoUpgrade},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.Management.Automation.SwitchParameter]
- # Flag to disable auto upgrade of arc agents.
- ${DisableAutoUpgrade},
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]]
+ # List of arc agentry and system components errors on the cluster resource.
+ ${ArcAgentProfileAgentError},
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
- [System.String]
- # Override the default container log path to enable fluent-bit logging.
- ${ContainerLogPath},
-
- [Parameter(ParameterSetName='SetExpanded', Mandatory)]
- [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)]
- [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
- # The geo-location where the resource lives
- ${Location},
+ # Version of the Arc agents to be installed on the cluster resource
+ ${ArcAgentProfileDesiredAgentVersion},
[Parameter()]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [System.String]
- # Path to the kube config file
- ${KubeConfig},
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]]
+ # List of system extensions that are installed on the cluster resource.
+ ${ArcAgentProfileSystemComponent},
[Parameter()]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [System.String]
- # Kubconfig context from current machine
- ${KubeContext},
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]]
+ # Configuration settings for customizing the behavior of the connected cluster.
+ ${ArcAgentryConfiguration},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit]
+ [System.String]
# Indicates whether Azure Hybrid Benefit is opted in
${AzureHybridBenefit},
@@ -206,35 +225,49 @@ param(
# The Kubernetes distribution version on this connected cluster.
${DistributionVersion},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Indicates whether the gateway for arc router connectivity is enabled.
+ ${GatewayEnabled},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.
${Infrastructure},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # The kind of connected cluster.
+ ${Kind},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
+ # This is populated only if privateLinkState is enabled.
# The resource id of the private link scope this connected cluster is assigned to, if any.
${PrivateLinkScopeResourceId},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState]
+ [System.String]
# Property which describes the state of private link on a connected cluster resource.
${PrivateLinkState},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState]
+ [System.String]
# Provisioning state of the connected cluster resource.
${ProvisioningState},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -260,7 +293,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.Management.Automation.SwitchParameter]
- # Enable the workload identity Webhook
+ # Whether to enable or disable the workload identity Webhook
${WorkloadIdentityEnabled},
[Parameter()]
@@ -298,8 +331,8 @@ param(
[Parameter(ParameterSetName='SetDisableGateway', Mandatory, ValueFromPipeline)]
[Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster]
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster]
+ #
${InputObject},
[Parameter()]
@@ -307,7 +340,8 @@ param(
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter()]
@@ -345,14 +379,14 @@ param(
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Uri]
- # The URI of the proxy server for host os to use
+ # The URI for the proxy server to use
${Proxy},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
[System.Management.Automation.PSCredential]
- # The credential of the proxy server for host os to use
+ # Credentials for a proxy server to use for the remote call
${ProxyCredential},
[Parameter(DontShow)]
@@ -369,6 +403,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -395,9 +438,7 @@ begin {
SetDisableGateway = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes';
Set = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes';
}
- if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -411,6 +452,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1
index 3685febd472f..eeadaf1507d7 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1
@@ -31,7 +31,7 @@ Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupNa
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -46,10 +46,12 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes
#>
function Update-AzConnectedKubernetes {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Alias('Name')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[System.String]
@@ -57,6 +59,8 @@ param(
${ClusterName},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[System.String]
# The name of the resource group.
@@ -64,6 +68,8 @@ param(
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -74,13 +80,13 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit]
+ [System.String]
# Indicates whether Azure Hybrid Benefit is opted in
${AzureHybridBenefit},
@@ -90,31 +96,47 @@ param(
# Accept EULA of ConnectedKubernetes, legal term will pop up without this parameter provided
${AcceptEULA},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# Represents the distribution of the connected cluster
${Distribution},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
[System.String]
# Represents the Kubernetes distribution version on this connected cluster.
${DistributionVersion},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter(DontShow)]
@@ -164,6 +186,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -184,11 +215,11 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ UpdateViaJsonString = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ UpdateViaJsonFilePath = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded', 'UpdateViaJsonString', 'UpdateViaJsonFilePath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -202,6 +233,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json
index cc5eb60bd359..c8253cebc8ca 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json
@@ -1,3 +1,3 @@
{
- "generate_Id": "24497465-e141-4709-bc7e-6d0fb8c455b8"
+ "generate_Id": "f29daa0d-6315-4b6d-bde7-fcfac0b81b46"
}
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs
index 3ab774f5977f..8419ffab11c0 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs
@@ -28,12 +28,20 @@ public partial class Module
public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+ private static bool _init = false;
+
+ private static readonly global::System.Object _initLock = new global::System.Object();
+
+ private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module _instance;
+
/// the ISendAsync pipeline instance
private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline _pipeline;
/// the ISendAsync pipeline instance (when proxy is enabled)
private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline _pipelineWithProxy;
+ private static readonly global::System.Object _singletonLock = new global::System.Object();
+
public bool _useProxy = false;
public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
@@ -56,11 +64,8 @@ public partial class Module
/// The delegate to get the telemetry info.
public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; }
- /// Backing field for property.
- private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module _instance;
-
/// the singleton of this module class
- public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module());
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } }
/// The Name of this module
public string Name => @"Az.ConnectedKubernetes";
@@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeli
/// Initialization steps performed after the module is loaded.
public void Init()
{
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
- CustomInit();
+ if (_init == false)
+ {
+ lock (_initLock) {
+ if (_init == false) {
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
+ CustomInit();
+ _init = true;
+ }
+ }
+ }
}
/// Creates the module instance.
diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs
index d53e499d3b6a..a894511e83ef 100644
--- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs
+++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs
@@ -15,7 +15,7 @@ public partial class ConnectedKubernetes
{
///
- /// API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM).
+ /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM).
///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
@@ -26,10 +26,11 @@ public partial class ConnectedKubernetes
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2024-07-15-preview";
// Constant Parameters
@@ -56,16 +57,16 @@ public partial class ConnectedKubernetes
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.ConnectedClusterCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.ConnectedClusterCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
///
- /// API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM).
+ /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM).
///
///
/// Parameters supplied to Create a Connected Cluster.
@@ -74,10 +75,11 @@ public partial class ConnectedKubernetes
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2024-07-15-preview";
// Constant Parameters
@@ -116,25 +118,1344 @@ public partial class ConnectedKubernetes
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.ConnectedClusterCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.ConnectedClusterCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
+ ///
+ /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM).
+ ///
+ ///
+ /// Parameters supplied to Create a Connected Cluster.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterCreateOrUpdateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM).
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Json string supplied to the ConnectedClusterCreateOrUpdate operation
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM).
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Json string supplied to the ConnectedClusterCreateOrUpdate operation
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterCreateOrUpdateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM).
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Parameters supplied to Create a Connected Cluster.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterCreateOrUpdateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Actual wire call for method.
+ ///
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // declared final-state-via: azure-async-operation
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // declared final-state-via: azure-async-operation
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will
+ /// get validation events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Parameters supplied to Create a Connected Cluster.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ ///
+ /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+ ///
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // declared final-state-via: location
+ var _finalUri = _response.GetFirstHeader(@"Location");
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation
+ /// events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ }
+ }
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterGetWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation
+ /// events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Resource Group
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Resource Group
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Resource Group
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Resource Group
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Actual wire call for method.
+ ///
/// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -142,105 +1463,74 @@ public partial class ConnectedKubernetes
try
{
var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
_response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // this operation supports x-ms-long-running-operation
- var _originalUri = request.RequestUri.AbsoluteUri;
- // declared final-state-via: azure-async-operation
- var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- var location = _response.GetFirstHeader(@"Location");
- while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
- // while we wait, let's grab the headers and get ready to poll.
- if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
- asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- }
- if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
- location = _response.GetFirstHeader(@"Location");
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
}
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
- request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
-
- // and let's look at the current response body and see if we have some information we can give back to the listener
- var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // drop the old response
- _response?.Dispose();
-
- // make the polling call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ default:
{
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
- break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result);
+ throw ex;
}
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException(_response);
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
}
}
-
- // check for terminal status code
- if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
- continue;
- }
- // we are done polling, do a request on final target?
- // create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
-
- // drop the old response
- _response?.Dispose();
-
- // make the final call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- break;
}
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Actual wire call for method.
+ ///
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -248,13 +1538,13 @@ public partial class ConnectedKubernetes
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -270,18 +1560,16 @@ public partial class ConnectedKubernetes
}
///
- /// Validation method for method. Call this like the actual call, but you will
- /// get validation events back.
+ /// Validation method for method. Call this like the actual call, but you
+ /// will get validation events back.
///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
- /// The name of the Kubernetes cluster on which get is called.
- /// Parameters supplied to Create a Connected Cluster.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -290,20 +1578,12 @@ public partial class ConnectedKubernetes
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
- await eventListener.AssertNotNull(nameof(clusterName),clusterName);
- await eventListener.AssertNotNull(nameof(body), body);
- await eventListener.AssertObjectIsValid(nameof(body), body);
}
}
- ///
- /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
- ///
+ /// API to enumerate registered connected K8s clusters under a Subscription
/// The ID of the target subscription.
- /// The name of the resource group. The name is case insensitive.
- /// The name of the Kubernetes cluster on which get is called.
/// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -311,7 +1591,7 @@ public partial class ConnectedKubernetes
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task ConnectedClusterDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
{
var apiVersion = @"2024-07-15-preview";
// Constant Parameters
@@ -321,10 +1601,7 @@ public partial class ConnectedKubernetes
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
- + "/resourcegroups/"
- + global::System.Uri.EscapeDataString(resourceGroupName)
- + "/providers/Microsoft.Kubernetes/connectedClusters/"
- + global::System.Uri.EscapeDataString(clusterName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -333,21 +1610,18 @@ public partial class ConnectedKubernetes
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Delete, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.ConnectedClusterDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ await this.ConnectedClusterListBySubscription_Call (request, onOk,onDefault,eventListener,sender);
}
}
- ///
- /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
- ///
+ /// API to enumerate registered connected K8s clusters under a Subscription
///
/// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -355,7 +1629,7 @@ public partial class ConnectedKubernetes
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task ConnectedClusterDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
{
var apiVersion = @"2024-07-15-preview";
// Constant Parameters
@@ -363,53 +1637,129 @@ public partial class ConnectedKubernetes
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters'");
}
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var clusterName = _match.Groups["clusterName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
- + "/resourcegroups/"
- + resourceGroupName
- + "/providers/Microsoft.Kubernetes/connectedClusters/"
- + clusterName
+ + subscriptionId
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListBySubscription_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Subscription
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.ConnectedClusterListBySubscriptionWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Subscription
+ /// The ID of the target subscription.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2024-07-15-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.ConnectedClusterDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ return await this.ConnectedClusterListBySubscriptionWithResult_Call (request, eventListener,sender);
}
}
- /// Actual wire call for method.
+ ///
+ /// Actual wire call for method.
+ ///
/// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -417,106 +1767,72 @@ public partial class ConnectedKubernetes
try
{
var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
_response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // this operation supports x-ms-long-running-operation
- var _originalUri = request.RequestUri.AbsoluteUri;
- // declared final-state-via: location
- var _finalUri = _response.GetFirstHeader(@"Location");
- var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- var location = _response.GetFirstHeader(@"Location");
- while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
- // while we wait, let's grab the headers and get ready to poll.
- if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
- asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- }
- if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
- location = _response.GetFirstHeader(@"Location");
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
}
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
- request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
-
- // and let's look at the current response body and see if we have some information we can give back to the listener
- var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // drop the old response
- _response?.Dispose();
-
- // make the polling call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ default:
{
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
- break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result);
+ throw ex;
}
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException(_response);
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
}
}
-
- // check for terminal status code
- if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
- continue;
- }
- // we are done polling, do a request on final target?
- // create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
-
- // drop the old response
- _response?.Dispose();
-
- // make the final call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- break;
}
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -524,19 +1840,13 @@ public partial class ConnectedKubernetes
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response);
- break;
- }
- case global::System.Net.HttpStatusCode.NoContent:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onNoContent(_response);
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -552,45 +1862,40 @@ public partial class ConnectedKubernetes
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation
- /// events back.
+ /// Validation method for method. Call this like the actual call, but you
+ /// will get validation events back.
///
/// The ID of the target subscription.
- /// The name of the resource group. The name is case insensitive.
- /// The name of the Kubernetes cluster on which get is called.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
- await eventListener.AssertNotNull(nameof(clusterName),clusterName);
}
}
///
- /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
- /// details.
+ /// Gets cluster user credentials of the connected cluster with a specified resource group and name.
///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// The name of the Kubernetes cluster on which get is called.
+ /// ListClusterUserCredential properties
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task ConnectedClusterGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredential(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties body, global::System.Func