Skip to content

Commit e961c97

Browse files
authored
[Az.ConnectedKubernetes] Update generation tool version: autorest.powershell v3 -> v4 (Azure#27553)
1 parent 34630bd commit e961c97

22 files changed

+1264
-464
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ConnectedKubernetes")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.14.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.14.0")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
27+
28+
29+
30+
31+
32+

src/ConnectedKubernetes/ConnectedKubernetes.Autorest/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,17 @@ title: ConnectedKubernetes
5454
module-version: 0.1.0
5555
subject-prefix: $(service-name)
5656

57-
identity-correction-for-post: true
58-
resourcegroup-append: true
59-
nested-object-to-string: true
60-
61-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
62-
use-extension:
63-
"@autorest/powershell": "3.x"
64-
6557
directive:
6658
- where:
6759
subject: ^ConnectedCluster(.*)
6860
set:
6961
subject: $1
7062
- where:
71-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
63+
variant: ^(Create|Update)(?!.*?(Expanded))
64+
subject-prefix: ConnectedKubernetes
65+
remove: true
66+
- where:
67+
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
7268
subject-prefix: ConnectedKubernetes
7369
remove: true
7470
- where:

src/ConnectedKubernetes/ConnectedKubernetes.Autorest/custom/New-AzConnectedKubernetes.ps1

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps
2828
New-AzConnectedKubernetes -ClusterName azps_test_cluster1 -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01
2929
3030
.Outputs
31-
Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster
31+
Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster
3232
.Link
3333
https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes
3434
#>
3535
function New-AzConnectedKubernetes {
36-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])]
37-
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', SupportsShouldProcess, PositionalBinding = $false, ConfirmImpact = 'Medium')]
36+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])]
37+
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3838
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '',
3939
Justification = 'Code published before this issue was identified')]
4040
param(
@@ -54,7 +54,7 @@ function New-AzConnectedKubernetes {
5454

5555
[Parameter()]
5656
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
57-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')]
57+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
5858
[System.String]
5959
# The ID of the target subscription.
6060
${SubscriptionId},
@@ -77,6 +77,46 @@ function New-AzConnectedKubernetes {
7777
# The comma-separated list of hostnames that should be excluded from the proxy server for the kubernetes cluster to use
7878
${NoProxy},
7979

80+
[Parameter()]
81+
[AllowEmptyCollection()]
82+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
83+
[System.String[]]
84+
# The list of AAD group object IDs that will have admin role of the cluster.
85+
${AadProfileAdminGroupObjectID},
86+
87+
[Parameter()]
88+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
89+
[System.Management.Automation.SwitchParameter]
90+
# Whether to enable Azure RBAC for Kubernetes authorization.
91+
${AadProfileEnableAzureRbac},
92+
93+
[Parameter()]
94+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
95+
[System.String]
96+
# The AAD tenant ID to use for authentication.
97+
# If not specified, will use the tenant of the deployment subscription.
98+
${AadProfileTenantId},
99+
100+
[Parameter()]
101+
[AllowEmptyCollection()]
102+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
103+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]]
104+
# List of arc agentry and system components errors on the cluster resource.
105+
${ArcAgentProfileAgentError},
106+
107+
[Parameter()]
108+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
109+
[System.String]
110+
# Version of the Arc agents to be installed on the cluster resource
111+
${ArcAgentProfileDesiredAgentVersion},
112+
113+
[Parameter()]
114+
[AllowEmptyCollection()]
115+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
116+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]]
117+
# List of system extensions that are installed on the cluster resource.
118+
${ArcAgentProfileSystemComponent},
119+
80120
[Parameter()]
81121
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
82122
[System.String]
@@ -121,9 +161,9 @@ function New-AzConnectedKubernetes {
121161
${Location},
122162

123163
[Parameter()]
124-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])]
164+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")]
125165
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
126-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit]
166+
[System.String]
127167
# Indicates whether Azure Hybrid Benefit is opted in
128168
${AzureHybridBenefit},
129169

@@ -138,36 +178,56 @@ function New-AzConnectedKubernetes {
138178
[System.String]
139179
# The Kubernetes distribution version on this connected cluster.
140180
${DistributionVersion},
141-
181+
182+
[Parameter()]
183+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
184+
[System.Management.Automation.SwitchParameter]
185+
# Determines whether to enable a system-assigned identity for the resource.
186+
${EnableSystemAssignedIdentity},
187+
188+
[Parameter()]
189+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
190+
[System.Management.Automation.SwitchParameter]
191+
# Indicates whether the gateway for arc router connectivity is enabled.
192+
${GatewayEnabled},
193+
142194
[Parameter()]
143195
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
144196
[System.String]
145197
# The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.
146198
${Infrastructure},
147199

200+
[Parameter(ParameterSetName='CreateExpanded')]
201+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")]
202+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
203+
[System.String]
204+
# The kind of connected cluster.
205+
${Kind},
206+
148207
[Parameter()]
149208
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
150209
[System.String]
210+
# This is populated only if privateLinkState is enabled.
151211
# The resource id of the private link scope this connected cluster is assigned to, if any.
152212
${PrivateLinkScopeResourceId},
153213

154214
[Parameter()]
155-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])]
215+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")]
156216
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
157-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState]
217+
[System.String]
158218
# Property which describes the state of private link on a connected cluster resource.
159219
${PrivateLinkState},
160220

161221
[Parameter()]
162-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])]
222+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")]
163223
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
164-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState]
224+
[System.String]
165225
# Provisioning state of the connected cluster resource.
166226
${ProvisioningState},
167227

168228
[Parameter()]
169229
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
170-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))]
230+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))]
171231
[System.Collections.Hashtable]
172232
# Resource tags.
173233
${Tag},
@@ -206,7 +266,8 @@ function New-AzConnectedKubernetes {
206266
[ValidateNotNull()]
207267
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
208268
[System.Management.Automation.PSObject]
209-
# The credentials, account, tenant, and subscription used for communication with Azure.
269+
# The DefaultProfile parameter is not functional.
270+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
210271
${DefaultProfile},
211272

212273
[Parameter()]
@@ -244,14 +305,14 @@ function New-AzConnectedKubernetes {
244305
[Parameter(DontShow)]
245306
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
246307
[System.Uri]
247-
# The URI of the proxy server for host os to use
308+
# The URI for the proxy server to use
248309
${Proxy},
249310

250311
[Parameter(DontShow)]
251312
[ValidateNotNull()]
252313
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
253314
[System.Management.Automation.PSCredential]
254-
# The credential of the proxy server for host os to use
315+
# Credentials for a proxy server to use for the remote call
255316
${ProxyCredential},
256317

257318
[Parameter(DontShow)]

0 commit comments

Comments
 (0)