Skip to content

Commit cebad2a

Browse files
Migrate Aks from generation to main (#21509)
* Move Aks to main * update changelog and suppress signature issues --------- Co-authored-by: YanaXu <[email protected]>
1 parent 375af29 commit cebad2a

File tree

844 files changed

+89399
-17412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

844 files changed

+89399
-17412
lines changed

src/Aks/Aks.Autorest/Az.Aks.format.ps1xml

Lines changed: 2630 additions & 842 deletions
Large diffs are not rendered by default.

src/Aks/Aks.Autorest/Az.Aks.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Aks.private.dll'
1313
FormatsToProcess = './Az.Aks.format.ps1xml'
14-
FunctionsToExport = 'Get-AzAksNodePoolUpgradeProfile', 'Get-AzAksUpgradeProfile', 'Get-AzAksVersion', 'Start-AzAksCluster', 'Stop-AzAksCluster', '*'
14+
FunctionsToExport = 'Get-AzAksMaintenanceConfiguration', 'Get-AzAksManagedClusterCommandResult', 'Get-AzAksManagedClusterOSOption', 'Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint', 'Get-AzAksNodePoolUpgradeProfile', 'Get-AzAksSnapshot', 'Get-AzAksUpgradeProfile', 'Get-AzAksVersion', 'Install-AzAksCliTool', 'Invoke-AzAksAbortAgentPoolLatestOperation', 'Invoke-AzAksAbortManagedClusterLatestOperation', 'Invoke-AzAksRotateManagedClusterServiceAccountSigningKey', 'New-AzAksMaintenanceConfiguration', 'New-AzAksSnapshot', 'New-AzAksTimeInWeekObject', 'New-AzAksTimeSpanObject', 'Remove-AzAksMaintenanceConfiguration', 'Remove-AzAksSnapshot', 'Start-AzAksCluster', 'Start-AzAksManagedClusterCommand', 'Stop-AzAksCluster', '*'
1515
AliasesToExport = 'Get-AzAksClusterUpgradeProfile', '*'
1616
PrivateData = @{
1717
PSData = @{

src/Aks/Aks.Autorest/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ For information on how to develop for `Az.Aks`, see [how-to.md](how-to.md).
3030
> see https://aka.ms/autorest
3131
3232
``` yaml
33-
branch: e320555a456cbc894c5a89466defdfca45ca18a8
33+
branch: 6031674c73a95ffd60f58b5cdd633c94b3360467
3434
require:
3535
- $(this-folder)/../../readme.azure.noprofile.md
3636
input-file:
37-
- $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-09-01/managedClusters.json
38-
- $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2019-08-01/location.json
37+
- $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-02-01/managedClusters.json
38+
- $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-08-01/location.json
3939

4040
title: Aks
4141
module-version: 0.1.0
@@ -50,6 +50,22 @@ directive:
5050
subject: ^ManagedCluster$
5151
verb: Get|New|Set|Remove
5252
remove: true
53+
- where:
54+
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Run$|^RunViaIdentity$
55+
subject: ^MaintenanceConfiguration$|^Snapshot$|^ManagedClusterCommand$|^SnapshotTag$
56+
remove: true
57+
- where:
58+
subject: ^MaintenanceConfiguration$|^Snapshot$
59+
verb: Set
60+
remove: true
61+
# this API (Update SnapshotTag) is defined in swagger but not supported by RP
62+
- where:
63+
subject: ^SnapshotTag$
64+
verb: Update
65+
remove: true
66+
- model-cmdlet:
67+
- TimeSpan
68+
- TimeInWeek
5369
- where:
5470
subject: ^ManagedCluster$
5571
parameter-name: ResourceName

src/Aks/Aks.Autorest/build-module.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ $examplesFolder = Join-Path $PSScriptRoot 'examples'
122122
$null = New-Item -ItemType Directory -Force -Path $examplesFolder
123123

124124
Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
125-
$modelCmdlets = @()
125+
$modelCmdlets = @('TimeSpan', 'TimeInWeek')
126+
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
127+
if (Test-Path $modelCmdletFolder) {
128+
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
129+
}
126130
if ($modelCmdlets.Count -gt 0) {
127131
. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
128132
CreateModelCmdlet($modelCmdlets)

src/Aks/Aks.Autorest/create-model-cmdlets.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ function CreateModelCmdlet {
2323
}
2424

2525
$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
26-
$ModuleName = 'Aks'
2726
$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
2827
$null = New-Item -ItemType Directory -Force -Path $OutputDir
28+
if (''.length -gt 0) {
29+
$ModuleName = ''
30+
} else {
31+
$ModuleName = 'Az.Aks'
32+
}
2933

3034
$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
3135
$Content = ''
@@ -64,10 +68,10 @@ function CreateModelCmdlet {
6468
$ObjectType = $Model
6569
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
6670
# remove duplicated module name
67-
if ($ObjectType.StartsWith($ModuleName)) {
71+
if ($ObjectType.StartsWith('Aks')) {
6872
$ModulePrefix = ''
6973
} else {
70-
$ModulePrefix = $ModuleName
74+
$ModulePrefix = 'Aks'
7175
}
7276
$OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
7377

@@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}.
158162
.Outputs
159163
${ObjectTypeWithNamespace}
160164
.Link
161-
https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
165+
https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
162166
#>
163167
function New-Az${ModulePrefix}${ObjectType}Object {
164168
[OutputType('${ObjectTypeWithNamespace}')]

src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,4 +348,4 @@ Function Install-Kubelogin
348348
}
349349
#endregion
350350
}
351-
}
351+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
14+
# is regenerated.
15+
# ----------------------------------------------------------------------------------
16+
17+
<#
18+
.Synopsis
19+
Create an in-memory object for TimeInWeek.
20+
.Description
21+
Create an in-memory object for TimeInWeek.
22+
23+
.Outputs
24+
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek
25+
.Link
26+
https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeInWeekObject
27+
#>
28+
function New-AzAksTimeInWeekObject {
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek')]
30+
[CmdletBinding(PositionalBinding=$false)]
31+
Param(
32+
33+
[Parameter(HelpMessage="The day of the week.")]
34+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay])]
35+
[Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay]
36+
$Day,
37+
[Parameter(HelpMessage="Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.")]
38+
[int[]]
39+
$HourSlot
40+
)
41+
42+
process {
43+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek]::New()
44+
45+
if ($PSBoundParameters.ContainsKey('Day')) {
46+
$Object.Day = $Day
47+
}
48+
if ($PSBoundParameters.ContainsKey('HourSlot')) {
49+
$Object.HourSlot = $HourSlot
50+
}
51+
return $Object
52+
}
53+
}
54+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
14+
# is regenerated.
15+
# ----------------------------------------------------------------------------------
16+
17+
<#
18+
.Synopsis
19+
Create an in-memory object for TimeSpan.
20+
.Description
21+
Create an in-memory object for TimeSpan.
22+
23+
.Outputs
24+
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan
25+
.Link
26+
https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeSpanObject
27+
#>
28+
function New-AzAksTimeSpanObject {
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan')]
30+
[CmdletBinding(PositionalBinding=$false)]
31+
Param(
32+
33+
[Parameter(HelpMessage="The end of a time span.")]
34+
[System.DateTime]
35+
$End,
36+
[Parameter(HelpMessage="The start of a time span.")]
37+
[System.DateTime]
38+
$Start
39+
)
40+
41+
process {
42+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan]::New()
43+
44+
if ($PSBoundParameters.ContainsKey('End')) {
45+
$Object.End = $End
46+
}
47+
if ($PSBoundParameters.ContainsKey('Start')) {
48+
$Object.Start = $Start
49+
}
50+
return $Object
51+
}
52+
}
53+

src/Aks/Aks.Autorest/docs/Az.Aks.md

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,27 @@ Locale: en-US
1111
Microsoft Azure PowerShell: Aks cmdlets
1212

1313
## Az.Aks Cmdlets
14+
### [Get-AzAksMaintenanceConfiguration](Get-AzAksMaintenanceConfiguration.md)
15+
Gets the specified maintenance configuration of a managed cluster.
16+
17+
### [Get-AzAksManagedClusterCommandResult](Get-AzAksManagedClusterCommandResult.md)
18+
Gets the results of a command which has been run on the Managed Cluster.
19+
20+
### [Get-AzAksManagedClusterOSOption](Get-AzAksManagedClusterOSOption.md)
21+
Gets supported OS options in the specified subscription.
22+
23+
### [Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint](Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md)
24+
Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster.
25+
The operation returns properties of each egress endpoint.
26+
1427
### [Get-AzAksNodePoolUpgradeProfile](Get-AzAksNodePoolUpgradeProfile.md)
15-
Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name.
28+
Gets the upgrade profile for an agent pool.
29+
30+
### [Get-AzAksSnapshot](Get-AzAksSnapshot.md)
31+
Gets a snapshot.
1632

1733
### [Get-AzAksUpgradeProfile](Get-AzAksUpgradeProfile.md)
18-
Gets the details of the upgrade profile for a managed cluster with a specified resource group and name.
34+
Gets the upgrade profile of a managed cluster.
1935

2036
### [Get-AzAksVersion](Get-AzAksVersion.md)
2137
List available version for creating managed Kubernetes cluster.
@@ -24,9 +40,48 @@ The operation returns properties of each orchestrator including version, availab
2440
### [Install-AzAksCliTool](Install-AzAksCliTool.md)
2541
Download and install kubectl and kubelogin.
2642

43+
### [Invoke-AzAksAbortAgentPoolLatestOperation](Invoke-AzAksAbortAgentPoolLatestOperation.md)
44+
Aborts the currently running operation on the agent pool.
45+
The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes.
46+
If the operation completes before cancellation can take place, a 409 error code is returned.
47+
48+
### [Invoke-AzAksAbortManagedClusterLatestOperation](Invoke-AzAksAbortManagedClusterLatestOperation.md)
49+
Aborts the currently running operation on the managed cluster.
50+
The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes.
51+
If the operation completes before cancellation can take place, a 409 error code is returned.
52+
53+
### [Invoke-AzAksRotateManagedClusterServiceAccountSigningKey](Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md)
54+
Rotates the service account signing keys of a managed cluster.
55+
56+
### [New-AzAksMaintenanceConfiguration](New-AzAksMaintenanceConfiguration.md)
57+
Creates or updates a maintenance configuration in the specified managed cluster.
58+
59+
### [New-AzAksSnapshot](New-AzAksSnapshot.md)
60+
Creates or updates a snapshot.
61+
62+
### [New-AzAksTimeInWeekObject](New-AzAksTimeInWeekObject.md)
63+
Create an in-memory object for TimeInWeek.
64+
65+
### [New-AzAksTimeSpanObject](New-AzAksTimeSpanObject.md)
66+
Create an in-memory object for TimeSpan.
67+
68+
### [Remove-AzAksMaintenanceConfiguration](Remove-AzAksMaintenanceConfiguration.md)
69+
Deletes a maintenance configuration.
70+
71+
### [Remove-AzAksSnapshot](Remove-AzAksSnapshot.md)
72+
Deletes a snapshot.
73+
2774
### [Start-AzAksCluster](Start-AzAksCluster.md)
28-
Starts a Stopped Managed Cluster
75+
See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster.
76+
77+
### [Start-AzAksManagedClusterCommand](Start-AzAksManagedClusterCommand.md)
78+
AKS will create a pod to run the command.
79+
This is primarily useful for private clusters.
80+
For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
2981

3082
### [Stop-AzAksCluster](Stop-AzAksCluster.md)
31-
Stops a Running Managed Cluster
83+
This can only be performed on Azure Virtual Machine Scale set backed clusters.
84+
Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state.
85+
A cluster does not accrue charges while it is stopped.
86+
See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster.
3287

0 commit comments

Comments
 (0)