Skip to content

[Az.Aks] Update generation tool version: autorest.powershell v3->v4 #27521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Aks/Aks.Autorest/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ generated
internal
exports
tools
custom/autogen-model-cmdlets
test/*-TestResults.xml
license.txt
/*.ps1
Expand Down
5 changes: 2 additions & 3 deletions src/Aks/Aks.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Aks")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("6.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("6.1.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("6.1.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("6.1.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

105 changes: 5 additions & 100 deletions src/Aks/Aks.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ input-file:
title: Aks
module-version: 0.1.0
subject-prefix: $(service-name)
identity-correction-for-post: true

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
- where:
Expand All @@ -52,7 +47,7 @@ directive:
verb: Get|New|Set|Remove
remove: true
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Run$|^RunViaIdentity$
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Run$|^RunViaIdentity$|^UpdateViaIdentityManagedCluster$|^UpdateViaIdentityManagedClusterExpanded$|^CreateViaIdentityManagedCluster$|^CreateViaIdentityManagedClusterExpanded$
subject: ^MaintenanceConfiguration$|^Snapshot$|^ManagedClusterCommand$|^SnapshotTag$
remove: true
- where:
Expand All @@ -65,8 +60,10 @@ directive:
verb: Update
remove: true
- model-cmdlet:
- TimeSpan
- TimeInWeek
- model-name: TimeSpan
cmdlet-name: New-AzAksTimeSpanObject
- model-name: TimeInWeek
cmdlet-name: New-AzAksTimeInWeekObject
- where:
subject: ^ManagedCluster$
parameter-name: ResourceName
Expand Down Expand Up @@ -121,96 +118,4 @@ directive:
- where:
subject: ContainerServiceOrchestrator
hide: true

#breaking change message
- where:
verb: Get|New
subject: MaintenanceConfiguration
set:
breaking-change:
deprecated-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration
replacement-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration
deprecated-output-properties:
- TimeInWeek Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek
- NotAllowedTime Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan
new-output-properties:
- TimeInWeek System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek]
- NotAllowedTime System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan]
change-description:
- The type of property 'TimeInWeek' of type 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek[]' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeInWeek]'
- The type of property 'NotAllowedTime' of type 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ITimeSpan]'
deprecated-by-version: 7.0.0
deprecated-by-azversion: 14.0.0
change-effective-date: 2025/05/19

- where:
verb: Get
subject: ManagedClusterOSOption
set:
breaking-change:
deprecated-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile
replacement-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile
deprecated-output-properties:
- OSOptionPropertyList Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty
new-output-properties:
- OSOptionPropertyList System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty]
change-description:
- The type of property 'OSOptionPropertyList' of type 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProperty]'.
deprecated-by-version: 7.0.0
deprecated-by-azversion: 14.0.0
change-effective-date: 2025/05/19

- where:
verb: Get
subject: ManagedClusterOutboundNetworkDependencyEndpoint
set:
breaking-change:
deprecated-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint
replacement-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOutboundEnvironmentEndpoint
deprecated-output-properties:
- Endpoint Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IEndpointDependency
new-output-properties:
- Endpoint System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IEndpointDependency]
change-description:
- The type of property 'Endpoint' of type 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IEndpointDependency' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IEndpointDependency]'.
deprecated-by-version: 7.0.0
deprecated-by-azversion: 14.0.0
change-effective-date: 2025/05/19

- where:
verb: Get
subject: NodePoolUpgradeProfile
set:
breaking-change:
deprecated-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile
replacement-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfile
deprecated-output-properties:
- Upgrade Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfilePropertiesUpgradesItem
new-output-properties:
- Upgrade System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfilePropertiesUpgradesItem]
change-description:
- The type of property 'Upgrade' of type 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfilePropertiesUpgradesItem' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolUpgradeProfilePropertiesUpgradesItem]'.
deprecated-by-version: 7.0.0
deprecated-by-azversion: 14.0.0
change-effective-date: 2025/05/19

- where:
verb: Get
subject: UpgradeProfile
set:
breaking-change:
deprecated-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile
replacement-cmdlet-output-type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterUpgradeProfile
deprecated-output-properties:
- AgentPoolProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfile
- ControlPlaneProfileUpgrade Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfileUpgradesItem
new-output-properties:
- AgentPoolProfile System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfile]
- ControlPlaneProfileUpgrade System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfileUpgradesItem]
change-description:
- The type of property 'AgentPoolProfile' of type 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfile' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfile]'.
- The type of property 'ControlPlaneProfileUpgrade' of type 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfileUpgradesItem' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClusterPoolUpgradeProfileUpgradesItem]'.
deprecated-by-version: 7.0.0
deprecated-by-azversion: 14.0.0
change-effective-date: 2025/05/19
```
3 changes: 1 addition & 2 deletions src/Aks/Aks.Autorest/custom/Get-AzAksVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ List available version for creating managed Kubernetes cluster.
The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview.
#>
function Get-AzAksVersion {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20190801.IOrchestratorVersionProfileListResult])]
[Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20190801.IOrchestratorVersionProfileListResult", "14.0.0", "7.0.0", "2025/05/19", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOrchestratorVersionProfileListResult", DeprecatedOutputProperties = ("Orchestrator Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOrchestratorVersionProfile"), NewOutputProperties = ("Orchestrator System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOrchestratorVersionProfile]"))]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOrchestratorVersionProfileListResult])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,27 @@ Create an in-memory object for TimeInWeek.
Create an in-memory object for TimeInWeek.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeInWeek
.Link
https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeInWeekObject
https://learn.microsoft.com/powershell/module/Az.Aks/new-azakstimeinweekobject
#>
function New-AzAksTimeInWeekObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek')]
[Microsoft.Azure.PowerShell.Cmdlets.Aks.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeInWeek')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(HelpMessage="The day of the week.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay])]
[Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay]
[Microsoft.Azure.PowerShell.Cmdlets.Aks.PSArgumentCompleterAttribute("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")]
[string]
$Day,
[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.")]
[int[]]
$HourSlot
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeInWeek]::New()

if ($PSBoundParameters.ContainsKey('Day')) {
$Object.Day = $Day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ Create an in-memory object for TimeSpan.
Create an in-memory object for TimeSpan.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan
Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpan
.Link
https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeSpanObject
https://learn.microsoft.com/powershell/module/Az.Aks/new-azakstimespanobject
#>
function New-AzAksTimeSpanObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan')]
[Microsoft.Azure.PowerShell.Cmdlets.Aks.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpan')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -39,7 +40,7 @@ function New-AzAksTimeSpanObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.TimeSpan]::New()

if ($PSBoundParameters.ContainsKey('End')) {
$Object.End = $End
Expand Down
11 changes: 7 additions & 4 deletions src/Aks/Aks.Autorest/docs/Az.Aks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Aks
Module Guid: 31b8ecad-b901-48df-bd28-148fc912d386
Module Guid: c58774ba-be69-4451-842a-3d5d9ccc6473
Download Help Link: https://learn.microsoft.com/powershell/module/az.aks
Help Version: 1.0.0.0
Locale: en-US
Expand Down Expand Up @@ -54,10 +54,10 @@ If the operation completes before cancellation can take place, a 409 error code
Rotates the service account signing keys of a managed cluster.

### [New-AzAksMaintenanceConfiguration](New-AzAksMaintenanceConfiguration.md)
Creates or updates a maintenance configuration in the specified managed cluster.
create a maintenance configuration in the specified managed cluster.

### [New-AzAksSnapshot](New-AzAksSnapshot.md)
Creates or updates a snapshot.
create a snapshot.

### [New-AzAksTimeInWeekObject](New-AzAksTimeInWeekObject.md)
Create an in-memory object for TimeInWeek.
Expand All @@ -75,7 +75,7 @@ Deletes a snapshot.
See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster.

### [Start-AzAksManagedClusterCommand](Start-AzAksManagedClusterCommand.md)
AKS will create a pod to run the command.
AKS will run a pod to run the command.
This is primarily useful for private clusters.
For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).

Expand All @@ -85,3 +85,6 @@ Stopping a cluster stops the control plane and agent nodes entirely, while maint
A cluster does not accrue charges while it is stopped.
See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster.

### [Update-AzAksMaintenanceConfiguration](Update-AzAksMaintenanceConfiguration.md)
update a maintenance configuration in the specified managed cluster.

26 changes: 23 additions & 3 deletions src/Aks/Aks.Autorest/docs/Get-AzAksMaintenanceConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Get-AzAksMaintenanceConfiguration -InputObject <IAksIdentity> [-DefaultProfile <
[<CommonParameters>]
```

### GetViaIdentityManagedCluster
```
Get-AzAksMaintenanceConfiguration -ConfigName <String> -ManagedClusterInputObject <IAksIdentity>
[-DefaultProfile <PSObject>] [<CommonParameters>]
```

## DESCRIPTION
Gets the specified maintenance configuration of a managed cluster.

Expand Down Expand Up @@ -85,7 +91,7 @@ The name of the maintenance configuration.

```yaml
Type: System.String
Parameter Sets: Get
Parameter Sets: Get, GetViaIdentityManagedCluster
Aliases:

Required: True
Expand Down Expand Up @@ -113,7 +119,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity
Expand All @@ -127,6 +132,21 @@ Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -ManagedClusterInputObject
Identity Parameter

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity
Parameter Sets: GetViaIdentityManagedCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -ResourceGroupName
The name of the resource group.
The name is case insensitive.
Expand Down Expand Up @@ -182,7 +202,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration
### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IMaintenanceConfiguration

## NOTES

Expand Down
26 changes: 23 additions & 3 deletions src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterCommandResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Get-AzAksManagedClusterCommandResult -InputObject <IAksIdentity> [-DefaultProfil
[<CommonParameters>]
```

### GetViaIdentityManagedCluster
```
Get-AzAksManagedClusterCommandResult -CommandId <String> -ManagedClusterInputObject <IAksIdentity>
[-DefaultProfile <PSObject>] [-PassThru] [<CommonParameters>]
```

## DESCRIPTION
Gets the results of a command which has been run on the Managed Cluster.

Expand Down Expand Up @@ -56,7 +62,7 @@ Id of the command.

```yaml
Type: System.String
Parameter Sets: Get
Parameter Sets: Get, GetViaIdentityManagedCluster
Aliases:

Required: True
Expand Down Expand Up @@ -84,7 +90,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity
Expand All @@ -98,6 +103,21 @@ Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -ManagedClusterInputObject
Identity Parameter

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity
Parameter Sets: GetViaIdentityManagedCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -PassThru
Returns true when the command succeeds

Expand Down Expand Up @@ -168,7 +188,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult
### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IRunCommandResult

## NOTES

Expand Down
3 changes: 1 addition & 2 deletions src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOSOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity
Expand Down Expand Up @@ -130,7 +129,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile
### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IOSOptionProfile

## NOTES

Expand Down
Loading