diff --git a/src/Fleet/Fleet.Autorest/Az.Fleet.csproj b/src/Fleet/Fleet.Autorest/Az.Fleet.csproj
new file mode 100644
index 000000000000..8a231ad51e68
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/Az.Fleet.csproj
@@ -0,0 +1,10 @@
+
+
+ Fleet
+ Fleet
+ Fleet.Autorest
+
+
+
+
+
diff --git a/src/Fleet/Fleet.Autorest/Az.Fleet.format.ps1xml b/src/Fleet/Fleet.Autorest/Az.Fleet.format.ps1xml
new file mode 100644
index 000000000000..b554c7e7ab91
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/Az.Fleet.format.ps1xml
@@ -0,0 +1,1341 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ErrorDetail#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Fleet
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Fleet#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ ETag
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetCredentialResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetCredentialResult#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Value
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetIdentity#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FleetMemberName
+
+
+ FleetName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
+
+ UpdateRunName
+
+
+ UpdateStrategyName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetListResult#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMember
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMember#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ ETag
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMemberListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMemberListResult#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMemberProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMemberProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ClusterResourceId
+
+
+ Group
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMemberUpdateProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetMemberUpdateProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Group
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetPatchTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetPatchTags#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategiesDeleteAcceptedResponseHeaders
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategiesDeleteAcceptedResponseHeaders#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategy
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategy#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ ETag
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategyListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategyListResult#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategyProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetUpdateStrategyProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ManagedClusterUpgradeSpec
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ManagedClusterUpgradeSpec#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ KubernetesVersion
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ManagedServiceIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ManagedServiceIdentity#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PrincipalId
+
+
+ TenantId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.MemberUpdateStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.MemberUpdateStatus#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ClusterResourceId
+
+
+ Message
+
+
+ Name
+
+
+ OperationId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.NodeImageVersion
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.NodeImageVersion#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Version
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Operation#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ActionType
+
+
+ IsDataAction
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.OperationDisplay#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.OperationListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.OperationListResult#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ProxyResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ProxyResource#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Resource#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.SystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.SystemData#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.TrackedResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.TrackedResource#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.TrackedResourceTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.TrackedResourceTags#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroupStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroupStatus#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRun
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRun#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ ETag
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunListResult#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ProvisioningState
+
+
+ UpdateStrategyId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunsDeleteAcceptedResponseHeaders
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunsDeleteAcceptedResponseHeaders#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunsStartAcceptedResponseHeaders
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunsStartAcceptedResponseHeaders#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunsStopAcceptedResponseHeaders
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateRunsStopAcceptedResponseHeaders#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStage
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStage#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AfterStageWaitInSecond
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStageStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStageStatus#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStatus#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CompletedTime
+
+
+ StartTime
+
+
+ State
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UserAssignedIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UserAssignedIdentity#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ClientId
+
+
+ PrincipalId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.WaitStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.WaitStatus#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ WaitDurationInSecond
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Fleet/Fleet.Autorest/Az.Fleet.psd1 b/src/Fleet/Fleet.Autorest/Az.Fleet.psd1
new file mode 100644
index 000000000000..4a84dc3215b9
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/Az.Fleet.psd1
@@ -0,0 +1,23 @@
+@{
+ GUID = '8d7b53b3-f39f-4f40-a64f-cb07e29ede3a'
+ RootModule = './Az.Fleet.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: Fleet cmdlets'
+ PowerShellVersion = '5.1'
+ DotNetFrameworkVersion = '4.7.2'
+ RequiredAssemblies = './bin/Az.Fleet.private.dll'
+ FormatsToProcess = './Az.Fleet.format.ps1xml'
+ FunctionsToExport = 'Get-AzFleet', 'Get-AzFleetCredentials', 'Get-AzFleetMember', 'Get-AzFleetUpdateRun', 'Get-AzFleetUpdateStrategy', 'New-AzFleet', 'New-AzFleetMember', 'New-AzFleetUpdateGroupObject', 'New-AzFleetUpdateRun', 'New-AzFleetUpdateStageObject', 'New-AzFleetUpdateStrategy', 'Remove-AzFleet', 'Remove-AzFleetMember', 'Remove-AzFleetUpdateRun', 'Remove-AzFleetUpdateStrategy', 'Start-AzFleetUpdateRun', 'Stop-AzFleetUpdateRun', 'Update-AzFleet', 'Update-AzFleetMember', 'Update-AzFleetUpdateRun', 'Update-AzFleetUpdateStrategy'
+ PrivateData = @{
+ PSData = @{
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Fleet'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = ''
+ }
+ }
+}
diff --git a/src/Fleet/Fleet.Autorest/Az.Fleet.psm1 b/src/Fleet/Fleet.Autorest/Az.Fleet.psm1
new file mode 100644
index 000000000000..bd9b3d3a6769
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/Az.Fleet.psm1
@@ -0,0 +1,115 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ # Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+ # ----------------------------------------------------------------------------------
+ # Load required Az.Accounts module
+ $accountsName = 'Az.Accounts'
+ $accountsModule = Get-Module -Name $accountsName
+ if(-not $accountsModule) {
+ $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
+ if(Test-Path -Path $localAccountsPath) {
+ $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
+ if($localAccounts) {
+ $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
+ }
+ }
+ if(-not $accountsModule) {
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0
+ if($hasAdequateVersion) {
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru
+ }
+ }
+ }
+
+ if(-not $accountsModule) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ }
+ Write-Information "Loaded Module '$($accountsModule.Name)'"
+
+ # Load the private module dll
+ $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.Fleet.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module]::Instance
+
+ # Ask for the shared functionality table
+ $VTable = Register-AzModule
+
+ # Tweaks the pipeline on module load
+ $instance.OnModuleLoad = $VTable.OnModuleLoad
+
+ # Following two delegates are added for telemetry
+ $instance.GetTelemetryId = $VTable.GetTelemetryId
+ $instance.Telemetry = $VTable.Telemetry
+
+
+ # Tweaks the pipeline per call
+ $instance.OnNewRequest = $VTable.OnNewRequest
+
+ # Gets shared parameter values
+ $instance.GetParameterValue = $VTable.GetParameterValue
+
+ # Allows shared module to listen to events from this module
+ $instance.EventListener = $VTable.EventListener
+
+ # Gets shared argument completers
+ $instance.ArgumentCompleter = $VTable.ArgumentCompleter
+
+ # The name of the currently selected Azure profile
+ $instance.ProfileName = $VTable.ProfileName
+
+
+ # Load the custom module
+ $customModulePath = Join-Path $PSScriptRoot './custom/Az.Fleet.custom.psm1'
+ if(Test-Path $customModulePath) {
+ $null = Import-Module -Name $customModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export proxy cmdlet scripts
+ $exportsPath = Join-Path $PSScriptRoot './exports'
+ $directories = Get-ChildItem -Directory -Path $exportsPath
+ $profileDirectory = $null
+ if($instance.ProfileName) {
+ if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) {
+ $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName }
+ } else {
+ # Don't export anything if the profile doesn't exist for the module
+ $exportsPath = $null
+ Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded."
+ }
+ } elseif(($directories | Measure-Object).Count -gt 0) {
+ # Load the last folder if no profile is selected
+ $profileDirectory = $directories | Select-Object -Last 1
+ }
+
+ if($profileDirectory) {
+ Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
+ $exportsPath = $profileDirectory.FullName
+ }
+
+ if($exportsPath) {
+ Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
+ Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias)
+ }
+
+ # Finalize initialization of this module
+ $instance.Init();
+ Write-Information "Loaded Module '$($instance.Name)'"
+# endregion
diff --git a/src/Fleet/Fleet.Autorest/README.md b/src/Fleet/Fleet.Autorest/README.md
new file mode 100644
index 000000000000..9ff4ce1f458a
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/README.md
@@ -0,0 +1,78 @@
+
+# Az.Fleet
+This directory contains the PowerShell module for the Fleet service.
+
+---
+## Status
+[](https://www.powershellgallery.com/packages/Az.Fleet/)
+
+## Info
+- Modifiable: yes
+- Generated: all
+- Committed: yes
+- Packaged: yes
+
+---
+## Detail
+This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
+
+## Module Requirements
+- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
+
+## Authentication
+AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
+
+## Development
+For information on how to develop for `Az.Fleet`, see [how-to.md](how-to.md).
+
+
+### AutoRest Configuration
+> see https://aka.ms/autorest
+
+```yaml
+# pin the swagger version by using the commit id instead of branch name
+commit: 8f889f0967e411fc1042aed0a097868b360f525a
+require:
+# readme.azure.noprofile.md is the common configuration file
+ - $(this-folder)/../../readme.azure.noprofile.md
+ - $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md
+
+title: Fleet
+module-version: 0.1.0
+subject-prefix: $(service-name)
+
+directive:
+# # # Following is two common directive which are normally required in all the RPs
+# # # 1. Remove the unexpanded parameter set
+# # # 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
+ - where:
+ variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
+ remove: true
+ # Fix required parameter missing
+ - from: swagger-document
+ where: $.definitions.FleetMember
+ transform: $['required'] = ['properties']
+ - from: swagger-document
+ where: $.definitions.FleetUpdateStrategy
+ transform: $['required'] = ['properties']
+ - from: swagger-document
+ where: $.definitions.UpdateRun
+ transform: $['required'] = ['properties']
+ # Hide set cmdlet
+ - where:
+ verb: Set
+ remove: true
+ # Rename IdentityUserAssignedIdentity, UpdateStrategyName
+ - where:
+ parameter-name: IdentityUserAssignedIdentity
+ set:
+ parameter-name: UserAssignedIdentity
+ - where:
+ parameter-name: UpdateStrategyName
+ subject: FleetUpdateStrategy
+ set:
+ parameter-name: Name
+ # Add required model cmdlet
+ - model-cmdlet:
+ - model-name: UpdateStage
+ - model-name: UpdateGroup
diff --git a/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-members.json b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-members.json
new file mode 100644
index 000000000000..852facd87fe9
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-members.json
@@ -0,0 +1,95 @@
+{
+ "resourceType": "fleets/members",
+ "apiVersion": "2023-10-15",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet"
+ },
+ "commands": [
+ {
+ "name": "Get-AzFleetMember",
+ "description": "Get a FleetMember",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetmember"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get a FleetMember",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.fleetMemberName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzFleetMember",
+ "description": "Delete a FleetMember",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetmember"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete a FleetMember",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.fleetMemberName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-updateRuns.json b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-updateRuns.json
new file mode 100644
index 000000000000..1bc761454dfe
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-updateRuns.json
@@ -0,0 +1,181 @@
+{
+ "resourceType": "fleets/updateRuns",
+ "apiVersion": "2023-10-15",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet"
+ },
+ "commands": [
+ {
+ "name": "Get-AzFleetUpdateRun",
+ "description": "Get a UpdateRun",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdaterun"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get a UpdateRun",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.updateRunName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzFleetUpdateRun",
+ "description": "Delete a UpdateRun",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetupdaterun"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete a UpdateRun",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.updateRunName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Start-AzFleetUpdateRun",
+ "description": "Starts an UpdateRun.",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/start-azfleetupdaterun"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Starts an UpdateRun.",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.updateRunName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Stop-AzFleetUpdateRun",
+ "description": "Stops an UpdateRun.",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/stop-azfleetupdaterun"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Stops an UpdateRun.",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.updateRunName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-updateStrategies.json b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-updateStrategies.json
new file mode 100644
index 000000000000..8b19bda78058
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-updateStrategies.json
@@ -0,0 +1,95 @@
+{
+ "resourceType": "fleets/updateStrategies",
+ "apiVersion": "2023-10-15",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet"
+ },
+ "commands": [
+ {
+ "name": "Get-AzFleetUpdateStrategy",
+ "description": "Get a FleetUpdateStrategy",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdatestrategy"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get a FleetUpdateStrategy",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.updateStrategyName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzFleetUpdateStrategy",
+ "description": "Delete a FleetUpdateStrategy",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetupdatestrategy"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-FleetName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete a FleetUpdateStrategy",
+ "parameters": [
+ {
+ "name": "-FleetName",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.updateStrategyName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets.json b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets.json
new file mode 100644
index 000000000000..3e4e2d0bc55c
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets.json
@@ -0,0 +1,85 @@
+{
+ "resourceType": "fleets",
+ "apiVersion": "2023-10-15",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet"
+ },
+ "commands": [
+ {
+ "name": "Get-AzFleet",
+ "description": "Gets a Fleet.",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/get-azfleet"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Gets a Fleet.",
+ "parameters": [
+ {
+ "name": "-Name",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzFleet",
+ "description": "Delete a Fleet",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleet"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete a Fleet",
+ "parameters": [
+ {
+ "name": "-Name",
+ "value": "[Path.fleetName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Fleet/Fleet.Autorest/build-module.ps1 b/src/Fleet/Fleet.Autorest/build-module.ps1
new file mode 100644
index 000000000000..1a794c8657e1
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/build-module.ps1
@@ -0,0 +1,180 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
+$ErrorActionPreference = 'Stop'
+
+if($PSEdition -ne 'Core') {
+ Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
+}
+
+if(-not $NotIsolated -and -not $Debugger) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
+
+ if($LastExitCode -ne 0) {
+ # Build failed. Don't attempt to run the module.
+ return
+ }
+
+ if($Test) {
+ . (Join-Path $PSScriptRoot 'test-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Tests failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Docs) {
+ . (Join-Path $PSScriptRoot 'generate-help.ps1')
+ if($LastExitCode -ne 0) {
+ # Docs generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($UX) {
+ . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
+ if($LastExitCode -ne 0) {
+ # UX generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Pack) {
+ . (Join-Path $PSScriptRoot 'pack-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Packing failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1'
+ if($Code) {
+ . $runModulePath -Code
+ } elseif($Run) {
+ . $runModulePath
+ } else {
+ Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script."
+ }
+ return
+}
+
+$binFolder = Join-Path $PSScriptRoot 'bin'
+$objFolder = Join-Path $PSScriptRoot 'obj'
+
+if(-not $Debugger) {
+ Write-Host -ForegroundColor Green 'Cleaning build folders...'
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
+
+ if((Test-Path $binFolder) -or (Test-Path $objFolder)) {
+ Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?'
+ Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.'
+ }
+
+ Write-Host -ForegroundColor Green 'Compiling module...'
+ $buildConfig = 'Debug'
+ if($Release) {
+ $buildConfig = 'Release'
+ }
+ dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo
+ if($LastExitCode -ne 0) {
+ Write-Error 'Compilation failed.'
+ }
+
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release')
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.Fleet.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+
+# Load DLL to use build-time cmdlets
+$null = Import-Module -Name $dll
+
+$modulePaths = $dll
+$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.Fleet.custom.psm1'
+if(Test-Path $customPsm1) {
+ $modulePaths = @($dll, $customPsm1)
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(Test-Path $exportsFolder) {
+ $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $exportsFolder
+
+$internalFolder = Join-Path $PSScriptRoot 'internal'
+if(Test-Path $internalFolder) {
+ $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $internalFolder
+
+$psd1 = Join-Path $PSScriptRoot './Az.Fleet.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.Fleet'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
+$modelCmdlets = @(@{modelName="UpdateStage"; cmdletName=""}, @{modelName="UpdateGroup"; cmdletName=""})
+$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
+if (Test-Path $modelCmdletFolder) {
+ $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
+}
+if ($modelCmdlets.Count -gt 0) {
+ . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
+ CreateModelCmdlet($modelCmdlets)
+}
+
+if($NoDocs) {
+ Write-Host -ForegroundColor Green 'Creating exports...'
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
+} else {
+ Write-Host -ForegroundColor Green 'Creating exports and docs...'
+ $moduleDescription = 'Microsoft Azure PowerShell: Fleet cmdlets'
+ $docsFolder = Join-Path $PSScriptRoot 'docs'
+ if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+ }
+ $null = New-Item -ItemType Directory -Force -Path $docsFolder
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.Fleet.format.ps1xml'
+Export-FormatPs1xml -FilePath $formatPs1xml
+
+Write-Host -ForegroundColor Green 'Creating psd1...'
+$customFolder = Join-Path $PSScriptRoot 'custom'
+Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid
+
+Write-Host -ForegroundColor Green 'Creating test stubs...'
+$testFolder = Join-Path $PSScriptRoot 'test'
+$null = New-Item -ItemType Directory -Force -Path $testFolder
+Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder
+
+Write-Host -ForegroundColor Green 'Creating example stubs...'
+Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+
+if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
+{
+ Write-Host -ForegroundColor Green 'Creating ux metadata...'
+ . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/Fleet/Fleet.Autorest/check-dependencies.ps1 b/src/Fleet/Fleet.Autorest/check-dependencies.ps1
new file mode 100644
index 000000000000..90ca9867ae40
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/check-dependencies.ps1
@@ -0,0 +1,65 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+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 -NotIsolated
+ return
+}
+
+function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
+ if($predicate) {
+ $module = Get-Module -ListAvailable -Name $moduleName
+ if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) {
+ $null = New-Item -ItemType Directory -Force -Path $path
+ Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
+ if ($requiredVersion) {
+ Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path
+ }elseif($versionMinimum) {
+ Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
+ } else {
+ Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
+ }
+ }
+ }
+}
+
+$ProgressPreference = 'SilentlyContinue'
+$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1
+
+$localModulesPath = Join-Path $PSScriptRoot 'generated\modules'
+if(Test-Path -Path $localModulesPath) {
+ $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
+}
+
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5'
+DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
+
+$tools = Join-Path $PSScriptRoot 'tools'
+$resourceDir = Join-Path $tools 'Resources'
+$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'
+
+if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) {
+ Write-Host -ForegroundColor Green "Building local Resource module used for test..."
+ Set-Location $resourceDir
+ $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
+ $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
+ Set-Location $HOME/.PSSharedModules/Resources
+ $null = .\build-module.ps1
+ Set-Location $PSScriptRoot
+}
diff --git a/src/Fleet/Fleet.Autorest/create-model-cmdlets.ps1 b/src/Fleet/Fleet.Autorest/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..17336aacc587
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/create-model-cmdlets.ps1
@@ -0,0 +1,262 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+function CreateModelCmdlet {
+
+ param([Hashtable[]]$Models)
+
+ if ($Models.Count -eq 0)
+ {
+ return
+ }
+
+ $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
+ $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
+ $null = New-Item -ItemType Directory -Force -Path $OutputDir
+ if (''.length -gt 0) {
+ $ModuleName = ''
+ } else {
+ $ModuleName = 'Az.Fleet'
+ }
+ $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
+ $Content = ''
+ $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 )
+ { $Content += get-content $_.fullname -raw
+ } }
+
+ $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content)
+ $Nodes = $Tree.ChildNodes().ChildNodes()
+ $classConstantMember = @{}
+ foreach ($Model in $Models)
+ {
+ $ModelName = $Model.modelName
+ $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") }
+ $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") }
+ $classConstantMember = @()
+ foreach ($class in $ClassNode) {
+ foreach ($member in $class.Members) {
+ $isConstant = $false
+ foreach ($attr in $member.AttributeLists) {
+ $memberName = $attr.Attributes.Name.ToString()
+ if ($memberName.EndsWith('.Constant')) {
+ $isConstant = $true
+ break
+ }
+ }
+ if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) {
+ $classConstantMember += $member.Identifier.Value
+ }
+ }
+ }
+ if ($InterfaceNode.count -eq 0) {
+ continue
+ }
+ # through a queue, we iterate all the parent models.
+ $Queue = @($InterfaceNode)
+ $visited = @("I$ModelName")
+ $AllInterfaceNodes = @()
+ while ($Queue.count -ne 0)
+ {
+ $AllInterfaceNodes += $Queue[0]
+ # Baselist contains the direct parent models.
+ foreach ($parent in $Queue[0].BaseList.Types)
+ {
+ if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value)))
+ {
+ $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) })
+ $visited = [Array]$visited + $parent.Type.Right.Identifier.Value
+ }
+ }
+ $first, $Queue = $Queue
+ }
+
+ $Namespace = $InterfaceNode.Parent.Name
+ $ObjectType = $ModelName
+ $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
+ # remove duplicated module name
+ if ($ObjectType.StartsWith('Fleet')) {
+ $ModulePrefix = ''
+ } else {
+ $ModulePrefix = 'Fleet'
+ }
+ $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
+
+ $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string]
+ $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string]
+ foreach ($Node in $AllInterfaceNodes)
+ {
+ foreach ($Member in $Node.Members)
+ {
+ if ($classConstantMember.Contains($Member.Identifier.Value)) {
+ # skip constant member
+ continue
+ }
+ $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
+ $Required = $false
+ $Description = ""
+ $Readonly = $False
+ $mutability = @{Read = $true; Create = $true; Update = $true}
+ foreach ($Argument in $Arguments)
+ {
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Required")
+ {
+ $Required = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Description")
+ {
+ $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"')
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly")
+ {
+ $Readonly = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Read")
+ {
+ $mutability.Read = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Create")
+ {
+ $mutability.Create = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Update")
+ {
+ $mutability.Update = $Argument.Expression.Token.Value
+ }
+ }
+ if ($Readonly)
+ {
+ continue
+ }
+ $Identifier = $Member.Identifier.Value
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ if ($Type.StartsWith("System.Collections.Generic.List"))
+ {
+ # if the type is a list, we need to convert it to array
+ $matched = $Type -match '\<(?.+)\>$'
+ if ($matched)
+ {
+ $Type = $matches.Name + '[]';
+ }
+ }
+ $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
+ if ($Required -and $mutability.Create -and $mutability.Update)
+ {
+ $ParameterDefinePropertyList.Add("Mandatory")
+ }
+ if ($Description -ne "")
+ {
+ $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"")
+ }
+ $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
+ # check whether completer is needed
+ $completer = '';
+ if(IsEnumType($Member)){
+ $completer += GetCompleter($Member)
+ }
+ $ParameterDefineScript = "
+ [Parameter($ParameterDefineProperty)]${completer}
+ [${Type}]
+ `$${Identifier}"
+ $ParameterDefineScriptList.Add($ParameterDefineScript)
+ $ParameterAssignScriptList.Add("
+ if (`$PSBoundParameters.ContainsKey('${Identifier}')) {
+ `$Object.${Identifier} = `$${Identifier}
+ }")
+ }
+ }
+ $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator ","
+ $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator ""
+
+ $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object"
+ if ('' -ne $Model.cmdletName) {
+ $cmdletName = $Model.cmdletName
+ }
+ $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir
+ $cmdletNameInLowerCase = $cmdletName.ToLower()
+ $Script = "
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the ""License"");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an ""AS IS"" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for ${ObjectType}.
+.Description
+Create an in-memory object for ${ObjectType}.
+
+.Outputs
+${ObjectTypeWithNamespace}
+.Link
+https://learn.microsoft.com/powershell/module/${ModuleName}/${cmdletNameInLowerCase}
+#>
+function ${cmdletName} {
+ [OutputType('${ObjectTypeWithNamespace}')]
+ [CmdletBinding(PositionalBinding=`$false)]
+ Param(
+${ParameterDefineScript}
+ )
+
+ process {
+ `$Object = [${ObjectTypeWithNamespace}]::New()
+${ParameterAssignScript}
+ return `$Object
+ }
+}
+"
+ Set-Content -Path $OutputPath -Value $Script
+ }
+}
+
+function IsEnumType {
+ param (
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
+ )
+ $isEnum = $false
+ foreach ($attr in $property.AttributeLists) {
+ $attributeName = $attr.Attributes.Name.ToString()
+ if ($attributeName.Contains('ArgumentCompleter')) {
+ $isEnum = $true
+ break
+ }
+ }
+ return $isEnum;
+}
+
+function GetCompleter {
+ param (
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
+ )
+ foreach ($attr in $property.AttributeLists) {
+ $attributeName = $attr.Attributes.Name.ToString()
+ if ($attributeName.Contains('ArgumentCompleter')) {
+ $attributeName = $attributeName.Split("::")[-1]
+ $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments)
+ $completer += "`n [${attributeName}(${possibleValues})]"
+ return $completer
+ }
+ }
+}
diff --git a/src/Fleet/Fleet.Autorest/custom/Az.Fleet.custom.psm1 b/src/Fleet/Fleet.Autorest/custom/Az.Fleet.custom.psm1
new file mode 100644
index 000000000000..0e6d030be9bc
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/custom/Az.Fleet.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Fleet.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Fleet.internal.psm1'
+ if(Test-Path $internalModulePath) {
+ $null = Import-Module -Name $internalModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export script cmdlets
+ Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias)
+# endregion
diff --git a/src/Fleet/Fleet.Autorest/custom/README.md b/src/Fleet/Fleet.Autorest/custom/README.md
new file mode 100644
index 000000000000..cbcd0c559053
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.Fleet` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Fleet.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.Fleet` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*.
+
+For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Fleet.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
+
+For script cmdlets, these are loaded via the `Az.Fleet.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
+
+## Purpose
+This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
+
+## Usage
+The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
+- Break
+- DefaultProfile
+- HttpPipelineAppend
+- HttpPipelinePrepend
+- Proxy
+- ProxyCredential
+- ProxyUseDefaultCredentials
+
+These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.Fleet`. For C#, follow the usage seen in the `ProcessRecordAsync` method.
+
+### Attributes
+For processing the cmdlets, we've created some additional attributes:
+- `Microsoft.Azure.PowerShell.Cmdlets.Fleet.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.Fleet.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Fleet`.
+- `Microsoft.Azure.PowerShell.Cmdlets.Fleet.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Fleet`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.Fleet.ProfileAttribute`
+ - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/Fleet/Fleet.Autorest/custom/autogen-model-cmdlets/New-AzFleetUpdateGroupObject.ps1 b/src/Fleet/Fleet.Autorest/custom/autogen-model-cmdlets/New-AzFleetUpdateGroupObject.ps1
new file mode 100644
index 000000000000..2153ca07c7d5
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/custom/autogen-model-cmdlets/New-AzFleetUpdateGroupObject.ps1
@@ -0,0 +1,48 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for UpdateGroup.
+.Description
+Create an in-memory object for UpdateGroup.
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup
+.Link
+https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdategroupobject
+#>
+function New-AzFleetUpdateGroupObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(Mandatory, HelpMessage="Name of the group.
+ It must match a group name of an existing fleet member. .")]
+ [string]
+ $Name
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup]::New()
+
+ if ($PSBoundParameters.ContainsKey('Name')) {
+ $Object.Name = $Name
+ }
+ return $Object
+ }
+}
+
diff --git a/src/Fleet/Fleet.Autorest/custom/autogen-model-cmdlets/New-AzFleetUpdateStageObject.ps1 b/src/Fleet/Fleet.Autorest/custom/autogen-model-cmdlets/New-AzFleetUpdateStageObject.ps1
new file mode 100644
index 000000000000..37da5d1dcaf7
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/custom/autogen-model-cmdlets/New-AzFleetUpdateStageObject.ps1
@@ -0,0 +1,59 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for UpdateStage.
+.Description
+Create an in-memory object for UpdateStage.
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStage
+.Link
+https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdatestageobject
+#>
+function New-AzFleetUpdateStageObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStage')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(HelpMessage="The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified.")]
+ [int]
+ $AfterStageWaitInSecond,
+ [Parameter(HelpMessage="Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateGroup[]]
+ $Group,
+ [Parameter(Mandatory, HelpMessage="The name of the stage. Must be unique within the UpdateRun.")]
+ [string]
+ $Name
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStage]::New()
+
+ if ($PSBoundParameters.ContainsKey('AfterStageWaitInSecond')) {
+ $Object.AfterStageWaitInSecond = $AfterStageWaitInSecond
+ }
+ if ($PSBoundParameters.ContainsKey('Group')) {
+ $Object.Group = $Group
+ }
+ if ($PSBoundParameters.ContainsKey('Name')) {
+ $Object.Name = $Name
+ }
+ return $Object
+ }
+}
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Get-AzFleet.md b/src/Fleet/Fleet.Autorest/examples/Get-AzFleet.md
new file mode 100644
index 000000000000..3efec435a3ac
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Get-AzFleet.md
@@ -0,0 +1,44 @@
+### Example 1: Lists the Fleet resources in a subscription
+```powershell
+Get-AzFleet
+```
+
+```output
+Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ETag ResourceGroupName
+-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ---- -----------------
+eastus sss 11/14/2023 8:05:54 AM user1@example.com User 11/14/2023 8:05:54 AM user1@example.com User "25052d24-0000-0100-0000-65532a620000" ps1-test
+eastus ttt 11/14/2023 9:55:13 AM user1@example.com User 11/14/2023 9:55:13 AM user1@example.com User "29054cbc-0000-0100-0000-655344020000" ps1-test
+```
+
+This command lists the Fleet resources in a subscription.
+
+### Example 2: Get specific fleet with specified name
+```powershell
+Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test
+```
+
+```output
+ETag : "61052549-0000-0100-0000-65542ab10000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01
+IdentityPrincipalId :
+IdentityTenantId :
+IdentityType :
+IdentityUserAssignedIdentity : {
+ }
+Location : eastus
+Name : testfleet01
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+SystemDataCreatedAt : 11/15/2023 2:19:28 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/15/2023 2:19:28 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Tag : {
+ }
+Type : Microsoft.ContainerService/fleets
+```
+
+This command gets specific fleet with specified name.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Get-AzFleetCredentials.md b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetCredentials.md
new file mode 100644
index 000000000000..b6bd20de9b6c
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetCredentials.md
@@ -0,0 +1,7 @@
+### Example 1: List the user credentials of a Fleet
+```powershell
+Get-AzFleetCredentials -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+```
+
+This command lists the user credentials of a fleet.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Get-AzFleetMember.md b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetMember.md
new file mode 100644
index 000000000000..8fccbea57550
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetMember.md
@@ -0,0 +1,40 @@
+### Example 1: Get specific fleet member with specified name
+```powershell
+Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name testmember
+```
+
+```output
+ClusterResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01
+ETag : "6205a537-0000-0100-0000-655430760000"
+Group :
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/members/testmember
+Name : testmember
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+SystemDataCreatedAt : 11/15/2023 2:43:32 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/15/2023 2:43:32 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/members
+```
+
+This command gets specific fleet member with specified name.
+
+### Example 2: Get a list of fleet member with specified fleet
+```powershell
+Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+```
+
+```output
+Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ETag Resource
+ GroupNam
+ e
+---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ---- --------
+testmember 11/21/2023 3:13:50 AM user1@example.com User 11/21/2023 3:13:50 AM user1@example.com User "bc061fb4-0000-0100-0000-655c208e0000" K8sFlee…
+testmember2 11/21/2023 4:11:24 AM user1@example.com User 11/21/2023 4:11:24 AM user1@example.com User "be067cf2-0000-0100-0000-655c2e280000" K8sFlee…
+```
+
+This command gets a list of fleet member with specified fleet.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Get-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetUpdateRun.md
new file mode 100644
index 000000000000..0c8ea346e7d9
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetUpdateRun.md
@@ -0,0 +1,88 @@
+### Example 1: Get a list of fleet update run with specified fleet
+```powershell
+Get-AzFleetUpdateRun -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+```
+
+```output
+Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ETag ResourceGroupN
+ ame
+---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ---- --------------
+run1 11/21/2023 10:03:56 AM user1@example.com User 11/21/2023 10:03:56 AM user1@example.com User "cb064a93-0000-0100-0000-655c81950000" K8sFleet-Test
+run2 11/21/2023 10:10:18 AM user1@example.com User 11/21/2023 10:10:18 AM user1@example.com User "cb0654a8-0000-0100-0000-655c820b0000" K8sFleet-Test
+```
+
+This command gets a list of fleet update run with specified fleet.
+
+### Example 2: Get specific fleet update run with specified name
+```powershell
+Get-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test
+```
+
+```output
+AdditionalInfo :
+Code :
+Detail :
+ETag : "cb064a93-0000-0100-0000-655c81950000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateRuns/run1
+Message :
+Name : run1
+NodeImageSelectionSelectedNodeImageVersion :
+NodeImageSelectionType : Latest
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StatusCompletedTime :
+StatusStage : {{
+ "status": {
+ "startTime": "2023-11-21T10:07:09.2665585Z",
+ "state": "Stopping"
+ },
+ "name": "default",
+ "groups": [
+ {
+ "status": {
+ "startTime": "2023-11-21T10:07:09.2665583Z",
+ "state": "Stopping"
+ },
+ "name": "default",
+ "members": [
+ {
+ "status": {
+ "startTime": "2023-11-21T10:07:09.2665580Z",
+ "state": "Running"
+ },
+ "name": "testmember",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01",
+ "operationId": "50c4e26b-a391-4f7a-9d04-510bcbeda57d",
+ "message": "all agent pools in managed cluster \"TestCluster01\" are already in the latest node image version"
+ },
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember2",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/testCluster02"
+ }
+ ]
+ }
+ ]
+ }}
+StatusStartTime : 11/21/2023 10:07:09 AM
+StatusState : Stopping
+StrategyStage :
+SystemDataCreatedAt : 11/21/2023 10:03:56 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 10:03:56 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Target :
+Type : Microsoft.ContainerService/fleets/updateRuns
+UpdateStrategyId :
+UpgradeKubernetesVersion : 1.28.3
+UpgradeType : Full
+```
+
+This command gets specific fleet update run with specified name.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Get-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetUpdateStrategy.md
new file mode 100644
index 000000000000..89ec465951a6
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Get-AzFleetUpdateStrategy.md
@@ -0,0 +1,47 @@
+### Example 1: Get a list of fleet update strategy with specified fleet
+```powershell
+Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+```
+
+```output
+Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ETag ResourceG
+ roupName
+---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ---- ---------
+strategy1 11/17/2023 9:08:49 AM user1@example.com User 11/17/2023 9:08:49 AM user1@example.com User "fd057996-0000-0100-0000-65572da20000" K8sFleet…
+strategy2 11/20/2023 9:36:32 AM user1@example.com User 11/20/2023 9:36:32 AM user1@example.com User "88066ba5-0000-0100-0000-655b28a00000" K8sFleet…
+strategy3 11/20/2023 9:40:21 AM user1@example.com User 11/20/2023 9:40:21 AM user1@example.com User "88067ac6-0000-0100-0000-655b29860000" K8sFleet…
+```
+
+This command get a list of fleet update strategy.
+
+### Example 2: Get a fleet update strategy with specified name
+```powershell
+Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1
+```
+
+```output
+ETag : "fd057996-0000-0100-0000-65572da20000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateStrategies/strategy1
+Name : strategy1
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StrategyStage : {{
+ "name": "stag1",
+ "groups": [
+ {
+ "name": "group-a"
+ }
+ ],
+ "afterStageWaitInSeconds": 3600
+ }}
+SystemDataCreatedAt : 11/17/2023 9:08:49 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/17/2023 9:08:49 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/updateStrategies
+```
+
+This command gets specific a fleet update strategy with specified update strategy name.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/New-AzFleet.md b/src/Fleet/Fleet.Autorest/examples/New-AzFleet.md
new file mode 100644
index 000000000000..6486cfdadc8c
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/New-AzFleet.md
@@ -0,0 +1,29 @@
+### Example 1: Creates a Fleet resource
+```powershell
+New-AzFleet -Name sss -ResourceGroupName ps1-test -Location eastus
+```
+
+```output
+ETag : "25052d24-0000-0100-0000-65532a620000"
+Id : /subscriptions/'subscriptionId'/resourceGroups/ps1-test/providers/Microsoft.ContainerService/fleets/sss
+IdentityPrincipalId :
+IdentityTenantId :
+IdentityType :
+IdentityUserAssignedIdentity : {
+ }
+Location : eastus
+Name : sss
+ProvisioningState : Succeeded
+ResourceGroupName : ps1-test
+SystemDataCreatedAt : 11/14/2023 8:05:54 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/14/2023 8:05:54 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Tag : {
+ }
+Type : Microsoft.ContainerService/fleets
+```
+
+This command creates a Fleet resource with a long running operation.
diff --git a/src/Fleet/Fleet.Autorest/examples/New-AzFleetMember.md b/src/Fleet/Fleet.Autorest/examples/New-AzFleetMember.md
new file mode 100644
index 000000000000..28f2bea68c71
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/New-AzFleetMember.md
@@ -0,0 +1,23 @@
+### Example 1: Create a FleetMember
+```powershell
+New-AzFleetMember -FleetName testfleet01 -Name testmember -ResourceGroupName K8sFleet-Test -ClusterResourceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01
+```
+
+```output
+ClusterResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01
+ETag : "6205a537-0000-0100-0000-655430760000"
+Group :
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/members/testmember
+Name : testmember
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+SystemDataCreatedAt : 11/15/2023 2:43:32 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/15/2023 2:43:32 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/members
+```
+
+This command creates a fleet member with a long running operation.
diff --git a/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateGroupObject.md b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateGroupObject.md
new file mode 100644
index 000000000000..a9c191d943c8
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateGroupObject.md
@@ -0,0 +1,13 @@
+### Example 1: Create a fleet update group
+```powershell
+New-AzFleetUpdateGroupObject -Name 'Group-a'
+```
+
+```output
+Name
+----
+Group-a
+```
+
+This command create a fleet update group object.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateRun.md
new file mode 100644
index 000000000000..82e87481dc28
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateRun.md
@@ -0,0 +1,68 @@
+### Example 1: Create a fleet update run
+```powershell
+New-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test -UpgradeType Full -UpgradeKubernetesVersion "1.26.1" -NodeImageSelectionType Latest
+```
+
+```output
+AdditionalInfo :
+Code :
+Detail :
+ETag : "cb06884a-0000-0100-0000-655c7fcf0000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateRuns/run1
+Message :
+Name : run1
+NodeImageSelectionSelectedNodeImageVersion :
+NodeImageSelectionType : Latest
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StatusCompletedTime :
+StatusStage : {{
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "default",
+ "groups": [
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "default",
+ "members": [
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01"
+ },
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember2",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/testCluster02"
+ }
+ ]
+ }
+ ]
+ }}
+StatusStartTime :
+StatusState : NotStarted
+StrategyStage :
+SystemDataCreatedAt : 11/21/2023 10:00:46 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 10:00:46 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Target :
+Type : Microsoft.ContainerService/fleets/updateRuns
+UpdateStrategyId :
+UpgradeKubernetesVersion : 1.28.1
+UpgradeType : Full
+```
+
+This command create a fleet update run.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateStageObject.md b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateStageObject.md
new file mode 100644
index 000000000000..97293f415a65
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateStageObject.md
@@ -0,0 +1,36 @@
+### Example 1: create fleet update stage object with group string array
+```powershell
+New-AzFleetUpdateStageObject -Name stag1 -Group @{name='group-a'} -AfterStageWaitInSecond 3600 | Format-List
+```
+
+```output
+AfterStageWaitInSecond : 3600
+Group : {{
+ "name": "group-a"
+ }}
+Name : stag1
+```
+
+This command create a fleet update stage object and shows as list.
+
+### Example 2: create fleet update stage object with update group object
+```powershell
+$a = New-AzFleetUpdateGroupObject -Name 'Group-a'
+$b = New-AzFleetUpdateGroupObject -Name 'Group-b'
+$c = New-AzFleetUpdateGroupObject -Name 'Group-c'
+New-AzFleetUpdateStageObject -Name stag1 -Group $a,$b,$c -AfterStageWaitInSecond 3600 | Format-List
+```
+
+```output
+AfterStageWaitInSecond : 3600
+Group : {{
+ "name": "Group-a"
+ }, {
+ "name": "Group-b"
+ }, {
+ "name": "Group-c"
+ }}
+Name : stag1
+```
+
+This command create a fleet update stage object and shows as list.
\ No newline at end of file
diff --git a/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateStrategy.md
new file mode 100644
index 000000000000..71088a9a201a
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/New-AzFleetUpdateStrategy.md
@@ -0,0 +1,65 @@
+### Example 1: Create a fleet update strategy
+```powershell
+$stage = New-AzFleetUpdateStageObject -Name stag1 -Group @{name='group-a'} -AfterStageWaitInSecond 3600
+New-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1 -StrategyStage $stage
+```
+
+```output
+ETag : "fd057996-0000-0100-0000-65572da20000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateStrategies/strategy1
+Name : strategy1
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StrategyStage : {{
+ "name": "stag1",
+ "groups": [
+ {
+ "name": "group-a"
+ }
+ ],
+ "afterStageWaitInSeconds": 3600
+ }}
+SystemDataCreatedAt : 11/17/2023 9:08:49 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/17/2023 9:08:49 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/updateStrategies
+```
+
+The first command creates a fleet update stage object. The second command creates a fleet update strategy.
+
+### Example 2: Create a fleet update strategy with a fleet object
+```powershell
+$f = Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test
+$stage2 = New-AzFleetUpdateStageObject -Name stag2 -Group @{name='group-b'} -AfterStageWaitInSecond 3600
+New-AzFleetUpdateStrategy -FleetInputObject $f -Name strategy3 -StrategyStage $stage2
+```
+
+```output
+ETag : "88067ac6-0000-0100-0000-655b29860000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateStrategies/strategy3
+Name : strategy3
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StrategyStage : {{
+ "name": "stag2",
+ "groups": [
+ {
+ "name": "group-b"
+ }
+ ],
+ "afterStageWaitInSeconds": 3600
+ }}
+SystemDataCreatedAt : 11/20/2023 9:40:21 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/20/2023 9:40:21 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/updateStrategies
+```
+
+The first command get a fleet. The second command creates a fleet update stage object. The third command uses fleet resource to create a fleet update strategy.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Remove-AzFleet.md b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleet.md
new file mode 100644
index 000000000000..922879cd8a94
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleet.md
@@ -0,0 +1,15 @@
+### Example 1: Delete a Fleet
+```powershell
+Remove-AzFleet -Name ttt -ResourceGroupName ps1-test
+```
+
+This command deletes a Fleet resource asynchronously with a long running operation.
+
+### Example 2: Delete a Fleet
+```powershell
+$f = Get-AzFleet -Name sss -ResourceGroupName ps1-test
+Remove-AzFleet -InputObject $f
+```
+
+This command deletes a Fleet resource with fleet object.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetMember.md b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetMember.md
new file mode 100644
index 000000000000..239514b997fa
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetMember.md
@@ -0,0 +1,15 @@
+### Example 1: Delete a fleet member
+```powershell
+Remove-AzFleetMember -FleetName testfleet01 -Name testmember -ResourceGroupName K8sFleet-Test
+```
+
+This command deletes a Fleet member with a long running operation.
+
+### Example 2: Delete a fleet member
+```powershell
+$m = Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name testmember
+Remove-AzFleetMember -InputObject $m
+```
+
+This command deletes a Fleet member asynchronously with resource object.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetUpdateRun.md
new file mode 100644
index 000000000000..c3610f48996d
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetUpdateRun.md
@@ -0,0 +1,7 @@
+### Example 1: Delete a fleet update run
+```powershell
+Remove-AzFleetUpdateRun -FleetName testfleet01 -Name run2 -ResourceGroupName K8sFleet-Test
+```
+
+This command delete specified fleet update run.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetUpdateStrategy.md
new file mode 100644
index 000000000000..4389b7d84612
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Remove-AzFleetUpdateStrategy.md
@@ -0,0 +1,15 @@
+### Example 1: delete a fleet update strategy with a fleet object
+```powershell
+$f = Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test
+Remove-AzFleetUpdateStrategy -FleetInputObject $f -Name strategy3
+```
+
+The first command gets a fleet. The second command removes a fleet update strategy with a fleet object.
+
+### Example 2: delete a fleet update strategy
+```powershell
+Remove-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy2
+```
+
+This command removes a fleet update strategy with name.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Start-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/examples/Start-AzFleetUpdateRun.md
new file mode 100644
index 000000000000..1c6b7ee423f9
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Start-AzFleetUpdateRun.md
@@ -0,0 +1,68 @@
+### Example 1: Start specific fleet update run with specified name
+```powershell
+Start-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test
+```
+
+```output
+AdditionalInfo :
+Code :
+Detail :
+ETag : "cb067c64-0000-0100-0000-655c808d0000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateRuns/run1
+Message :
+Name : run1
+NodeImageSelectionSelectedNodeImageVersion :
+NodeImageSelectionType : Latest
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StatusCompletedTime :
+StatusStage : {{
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "default",
+ "groups": [
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "default",
+ "members": [
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01"
+ },
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember2",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/testCluster02"
+ }
+ ]
+ }
+ ]
+ }}
+StatusStartTime :
+StatusState : NotStarted
+StrategyStage :
+SystemDataCreatedAt : 11/21/2023 10:03:56 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 10:03:56 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Target :
+Type : Microsoft.ContainerService/fleets/updateRuns
+UpdateStrategyId :
+UpgradeKubernetesVersion : 1.28.3
+UpgradeType : Full
+```
+
+This command starts specific fleet update run with specified name
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Stop-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/examples/Stop-AzFleetUpdateRun.md
new file mode 100644
index 000000000000..c11d6cef1967
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Stop-AzFleetUpdateRun.md
@@ -0,0 +1,73 @@
+### Example 1: Stop specific fleet update run with specified name
+```powershell
+Stop-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test
+```
+
+```output
+AdditionalInfo :
+Code :
+Detail :
+ETag : "cb064a93-0000-0100-0000-655c81950000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateRuns/run1
+Message :
+Name : run1
+NodeImageSelectionSelectedNodeImageVersion :
+NodeImageSelectionType : Latest
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StatusCompletedTime :
+StatusStage : {{
+ "status": {
+ "startTime": "2023-11-21T10:07:09.2665585Z",
+ "state": "Stopping"
+ },
+ "name": "default",
+ "groups": [
+ {
+ "status": {
+ "startTime": "2023-11-21T10:07:09.2665583Z",
+ "state": "Stopping"
+ },
+ "name": "default",
+ "members": [
+ {
+ "status": {
+ "startTime": "2023-11-21T10:07:09.2665580Z",
+ "state": "Running"
+ },
+ "name": "testmember",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01",
+ "operationId": "50c4e26b-a391-4f7a-9d04-510bcbeda57d",
+ "message": "all agent pools in managed cluster \"TestCluster01\" are already in the latest node image version"
+ },
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember2",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/testCluster02"
+ }
+ ]
+ }
+ ]
+ }}
+StatusStartTime : 11/21/2023 10:07:09 AM
+StatusState : Stopping
+StrategyStage :
+SystemDataCreatedAt : 11/21/2023 10:03:56 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 10:03:56 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Target :
+Type : Microsoft.ContainerService/fleets/updateRuns
+UpdateStrategyId :
+UpgradeKubernetesVersion : 1.28.3
+UpgradeType : Full
+```
+
+This command stop specific fleet update run with specified name.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Update-AzFleet.md b/src/Fleet/Fleet.Autorest/examples/Update-AzFleet.md
new file mode 100644
index 000000000000..71775d65c358
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Update-AzFleet.md
@@ -0,0 +1,31 @@
+### Example 1: Update tag of specified fleet
+```powershell
+Update-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test -Tag @{"123"="abc"}
+```
+
+```output
+ETag : "cb06f006-0000-0100-0000-655c7e120000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01
+IdentityPrincipalId :
+IdentityTenantId :
+IdentityType :
+IdentityUserAssignedIdentity : {
+ }
+Location : eastus
+Name : testfleet01
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+SystemDataCreatedAt : 11/15/2023 2:19:28 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 9:53:21 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Tag : {
+ "123": "abc"
+ }
+Type : Microsoft.ContainerService/fleets
+```
+
+This command updates tag of a fleet.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Update-AzFleetMember.md b/src/Fleet/Fleet.Autorest/examples/Update-AzFleetMember.md
new file mode 100644
index 000000000000..a499adfc6f32
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Update-AzFleetMember.md
@@ -0,0 +1,49 @@
+### Example 1: Update fleet member with specified member name and fleet name
+```powershell
+Update-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name testmember -Group 'group-a'
+```
+
+```output
+ClusterResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01
+ETag : "ca06635b-0000-0100-0000-655c797d0000"
+Group : group-a
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/members/testmember
+Name : testmember
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+SystemDataCreatedAt : 11/21/2023 9:33:48 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 9:33:48 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/members
+```
+
+This command updates fleet member with specified member name and fleet name.
+
+### Example 2: Update fleet member with specified fleet object and member name
+```powershell
+$member = Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name testmember
+Update-AzFleetMember -InputObject $member -Group 'group-a'
+```
+
+```output
+ClusterResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01
+ETag : "ca06266c-0000-0100-0000-655c79fa0000"
+Group : group-a
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/members/testmember
+Name : testmember
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+SystemDataCreatedAt : 11/21/2023 9:35:54 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 9:35:54 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/members
+```
+
+The first command get a fleet. The second command updates fleet member with specified fleet object and member name.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Update-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/examples/Update-AzFleetUpdateRun.md
new file mode 100644
index 000000000000..08386eb8e509
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Update-AzFleetUpdateRun.md
@@ -0,0 +1,68 @@
+### Example 1: Update a fleet update run
+```powershell
+Update-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test -UpgradeKubernetesVersion "1.28.3"
+```
+
+```output
+AdditionalInfo :
+Code :
+Detail :
+ETag : "cb067c64-0000-0100-0000-655c808d0000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateRuns/run1
+Message :
+Name : run1
+NodeImageSelectionSelectedNodeImageVersion :
+NodeImageSelectionType : Latest
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StatusCompletedTime :
+StatusStage : {{
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "default",
+ "groups": [
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "default",
+ "members": [
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01"
+ },
+ {
+ "status": {
+ "state": "NotStarted"
+ },
+ "name": "testmember2",
+ "clusterResourceId":
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/testCluster02"
+ }
+ ]
+ }
+ ]
+ }}
+StatusStartTime :
+StatusState : NotStarted
+StrategyStage :
+SystemDataCreatedAt : 11/21/2023 10:03:56 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 10:03:56 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Target :
+Type : Microsoft.ContainerService/fleets/updateRuns
+UpdateStrategyId :
+UpgradeKubernetesVersion : 1.28.3
+UpgradeType : Full
+```
+
+This command updates specified fleet update run.
+
diff --git a/src/Fleet/Fleet.Autorest/examples/Update-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/examples/Update-AzFleetUpdateStrategy.md
new file mode 100644
index 000000000000..1babe9e253ce
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/examples/Update-AzFleetUpdateStrategy.md
@@ -0,0 +1,65 @@
+### Example 1: Update a fleet update strategy with a fleet object
+```powershell
+$f = Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test
+$stage = New-AzFleetUpdateStageObject -Name stag1 -Group @{name='group-a'} -AfterStageWaitInSecond 3600
+Update-AzFleetUpdateStrategy -FleetInputObject $f -Name strategy3 -StrategyStage $stage
+```
+
+```output
+ETag : "8906612a-0000-0100-0000-655b2c330000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateStrategies/strategy3
+Name : strategy3
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StrategyStage : {{
+ "name": "stag1",
+ "groups": [
+ {
+ "name": "group-a"
+ }
+ ],
+ "afterStageWaitInSeconds": 3600
+ }}
+SystemDataCreatedAt : 11/20/2023 9:51:46 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/20/2023 9:51:46 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/updateStrategies
+```
+
+The first command get a fleet. The second command creates a new fleet update stage object. The third command updates stage for specified fleet update strategy with a fleet object.
+
+### Example 2: Update a fleet update strategy
+```powershell
+$stage = New-AzFleetUpdateStageObject -Name stag1 -Group @{name='group-a'} -AfterStageWaitInSecond 360
+Update-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1 -StrategyStage $stage
+```
+
+```output
+ETag : "c9064db3-0000-0100-0000-655c75350000"
+Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/Microsoft.ContainerService/fleets/testfleet01/updateStrategies/strategy1
+Name : strategy1
+ProvisioningState : Succeeded
+ResourceGroupName : K8sFleet-Test
+StrategyStage : {{
+ "name": "stag1",
+ "groups": [
+ {
+ "name": "group-a"
+ }
+ ],
+ "afterStageWaitInSeconds": 360
+ }}
+SystemDataCreatedAt : 11/21/2023 9:15:33 AM
+SystemDataCreatedBy : user1@example.com
+SystemDataCreatedByType : User
+SystemDataLastModifiedAt : 11/21/2023 9:15:33 AM
+SystemDataLastModifiedBy : user1@example.com
+SystemDataLastModifiedByType : User
+Type : Microsoft.ContainerService/fleets/updateStrategies
+```
+
+This command updates stage for specified fleet update strategy.
+
diff --git a/src/Fleet/Fleet.Autorest/export-surface.ps1 b/src/Fleet/Fleet.Autorest/export-surface.ps1
new file mode 100644
index 000000000000..21c20f32e387
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/export-surface.ps1
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $NotIsolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.Fleet.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.Fleet'
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+$resourcesFolder = Join-Path $PSScriptRoot 'resources'
+
+Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'"
+
+Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'"
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1
new file mode 100644
index 000000000000..c11d3178f817
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1
@@ -0,0 +1,213 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Gets a Fleet.
+.Description
+Gets a Fleet.
+.Example
+Get-AzFleet
+.Example
+Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet
+.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.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleet
+#>
+function Get-AzFleet {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('FleetName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleet_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleet_GetViaIdentity';
+ List = 'Az.Fleet.private\Get-AzFleet_List';
+ List1 = 'Az.Fleet.private\Get-AzFleet_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetCredentials.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetCredentials.ps1
new file mode 100644
index 000000000000..7f6a21eb8c3f
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetCredentials.ps1
@@ -0,0 +1,182 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Lists the user credentials of a Fleet.
+.Description
+Lists the user credentials of a Fleet.
+.Example
+Get-AzFleetCredentials -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetCredentialResults
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetcredentials
+#>
+function Get-AzFleetCredentials {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetCredentialResults])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.Fleet.private\Get-AzFleetCredentials_List';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1
new file mode 100644
index 000000000000..55046839297e
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1
@@ -0,0 +1,236 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a FleetMember
+.Description
+Get a FleetMember
+.Example
+Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name testmember
+.Example
+Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetmember
+#>
+function Get-AzFleetMember {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory)]
+ [Alias('FleetMemberName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet member resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleetMember_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleetMember_GetViaIdentity';
+ GetViaIdentityFleet = 'Az.Fleet.private\Get-AzFleetMember_GetViaIdentityFleet';
+ List = 'Az.Fleet.private\Get-AzFleetMember_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1
new file mode 100644
index 000000000000..eca1f3fb44d5
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1
@@ -0,0 +1,236 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a UpdateRun
+.Description
+Get a UpdateRun
+.Example
+Get-AzFleetUpdateRun -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+.Example
+Get-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateRun
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdaterun
+#>
+function Get-AzFleetUpdateRun {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateRun])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory)]
+ [Alias('UpdateRunName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the UpdateRun resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleetUpdateRun_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleetUpdateRun_GetViaIdentity';
+ GetViaIdentityFleet = 'Az.Fleet.private\Get-AzFleetUpdateRun_GetViaIdentityFleet';
+ List = 'Az.Fleet.private\Get-AzFleetUpdateRun_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1
new file mode 100644
index 000000000000..39f5c989019d
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1
@@ -0,0 +1,235 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a FleetUpdateStrategy
+.Description
+Get a FleetUpdateStrategy
+.Example
+Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+.Example
+Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetUpdateStrategy
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdatestrategy
+#>
+function Get-AzFleetUpdateStrategy {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetUpdateStrategy])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the UpdateStrategy resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_GetViaIdentity';
+ GetViaIdentityFleet = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_GetViaIdentityFleet';
+ List = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1
new file mode 100644
index 000000000000..b643d7a2853f
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1
@@ -0,0 +1,283 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a Fleet.
+.Description
+Create a Fleet.
+.Example
+New-AzFleet -Name sss -ResourceGroupName ps1-test -Location eastus
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet
+.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.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/new-azfleet
+#>
+function New-AzFleet {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Alias('FleetName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath')]
+ [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if an entity matches this string.
+ ${IfMatch},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if no entity matches this string.
+ ${IfNoneMatch},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The geo-location where the resource lives
+ ${Location},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ ${IdentityType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities]))]
+ [System.Collections.Hashtable]
+ # The set of user assigned identities associated with the resource.
+ # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ # The dictionary values can be empty objects ({}) in requests.
+ ${UserAssignedIdentity},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Fleet.private\New-AzFleet_CreateExpanded';
+ CreateViaIdentityExpanded = 'Az.Fleet.private\New-AzFleet_CreateViaIdentityExpanded';
+ CreateViaJsonFilePath = 'Az.Fleet.private\New-AzFleet_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.Fleet.private\New-AzFleet_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1
new file mode 100644
index 000000000000..3703ada2e1d7
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1
@@ -0,0 +1,294 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a FleetMember
+.Description
+Create a FleetMember
+.Example
+New-AzFleetMember -FleetName testfleet01 -Name testmember -ResourceGroupName K8sFleet-Test -ClusterResourceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetmember
+#>
+function New-AzFleetMember {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Alias('FleetMemberName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet member resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath')]
+ [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if an entity matches this string.
+ ${IfMatch},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if no entity matches this string.
+ ${IfNoneMatch},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The ARM resource id of the cluster that joins the Fleet.
+ # Must be a valid Azure resource id.
+ # e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ ${ClusterResourceId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The group this member belongs to for multi-cluster update management.
+ ${Group},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Fleet.private\New-AzFleetMember_CreateExpanded';
+ CreateViaIdentityExpanded = 'Az.Fleet.private\New-AzFleetMember_CreateViaIdentityExpanded';
+ CreateViaIdentityFleetExpanded = 'Az.Fleet.private\New-AzFleetMember_CreateViaIdentityFleetExpanded';
+ CreateViaJsonFilePath = 'Az.Fleet.private\New-AzFleetMember_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.Fleet.private\New-AzFleetMember_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateGroupObject.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateGroupObject.ps1
new file mode 100644
index 000000000000..5cebfe4e266e
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateGroupObject.ps1
@@ -0,0 +1,119 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for UpdateGroup.
+.Description
+Create an in-memory object for UpdateGroup.
+.Example
+New-AzFleetUpdateGroupObject -Name 'Group-a'
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup
+.Link
+https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdategroupobject
+#>
+function New-AzFleetUpdateGroupObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Name of the group.
+ # It must match a group name of an existing fleet member.
+ # .
+ ${Name}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ __AllParameterSets = 'Az.Fleet.custom\New-AzFleetUpdateGroupObject';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1
new file mode 100644
index 000000000000..1433b1a89361
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1
@@ -0,0 +1,334 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a UpdateRun
+.Description
+Create a UpdateRun
+.Example
+New-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test -UpgradeType Full -UpgradeKubernetesVersion "1.26.1" -NodeImageSelectionType Latest
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateRun
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+STRATEGYSTAGE : The list of stages that compose this update run. Min size: 1.
+ Name : The name of the stage. Must be unique within the UpdateRun.
+ [AfterStageWaitInSecond ]: The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified.
+ [Group >]: Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1.
+ Name : Name of the group. It must match a group name of an existing fleet member.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetupdaterun
+#>
+function New-AzFleetUpdateRun {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateRun])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Alias('UpdateRunName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the UpdateRun resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath')]
+ [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if an entity matches this string.
+ ${IfMatch},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if no entity matches this string.
+ ${IfNoneMatch},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Full", "NodeImageOnly")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set.
+ ${UpgradeType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Latest", "Consistent")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The node image upgrade type.
+ ${NodeImageSelectionType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[]]
+ # The list of stages that compose this update run.
+ # Min size: 1.
+ # To construct, see NOTES section for STRATEGYSTAGE properties and create a hash table.
+ ${StrategyStage},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The resource id of the FleetUpdateStrategy resource to reference.When creating a new run, there are three ways to define a strategy for the run:1.
+ # Define a new strategy in place: Set the "strategy" field.2.
+ # Use an existing strategy: Set the "updateStrategyId" field.
+ # (since 2023-08-15-preview)3.
+ # Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" unset.
+ # (since 2023-08-15-preview)Setting both "updateStrategyId" and "strategy" is invalid.UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and store it in the "strategy" field.
+ # Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate.
+ # UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.
+ ${UpdateStrategyId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The Kubernetes version to upgrade the member clusters to.
+ ${UpgradeKubernetesVersion},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Fleet.private\New-AzFleetUpdateRun_CreateExpanded';
+ CreateViaIdentityExpanded = 'Az.Fleet.private\New-AzFleetUpdateRun_CreateViaIdentityExpanded';
+ CreateViaIdentityFleetExpanded = 'Az.Fleet.private\New-AzFleetUpdateRun_CreateViaIdentityFleetExpanded';
+ CreateViaJsonFilePath = 'Az.Fleet.private\New-AzFleetUpdateRun_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.Fleet.private\New-AzFleetUpdateRun_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStageObject.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStageObject.ps1
new file mode 100644
index 000000000000..2106aa46e3df
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStageObject.ps1
@@ -0,0 +1,146 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for UpdateStage.
+.Description
+Create an in-memory object for UpdateStage.
+.Example
+New-AzFleetUpdateStageObject -Name stag1 -Group @{name='group-a'} -AfterStageWaitInSecond 3600 | Format-List
+.Example
+$a = New-AzFleetUpdateGroupObject -Name 'Group-a'
+$b = New-AzFleetUpdateGroupObject -Name 'Group-b'
+$c = New-AzFleetUpdateGroupObject -Name 'Group-c'
+New-AzFleetUpdateStageObject -Name stag1 -Group $a,$b,$c -AfterStageWaitInSecond 3600 | Format-List
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStage
+.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.
+
+GROUP : Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1.
+ Name : Name of the group. It must match a group name of an existing fleet member.
+.Link
+https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdatestageobject
+#>
+function New-AzFleetUpdateStageObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateStage])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The name of the stage.
+ # Must be unique within the UpdateRun.
+ ${Name},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.Int32]
+ # The time in seconds to wait at the end of this stage before starting the next one.
+ # Defaults to 0 seconds if unspecified.
+ ${AfterStageWaitInSecond},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateGroup[]]
+ # Defines the groups to be executed in parallel in this stage.
+ # Duplicate groups are not allowed.
+ # Min size: 1.
+ # To construct, see NOTES section for GROUP properties and create a hash table.
+ ${Group}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ __AllParameterSets = 'Az.Fleet.custom\New-AzFleetUpdateStageObject';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStrategy.ps1
new file mode 100644
index 000000000000..fdeafd2cfc0d
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStrategy.ps1
@@ -0,0 +1,297 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a FleetUpdateStrategy
+.Description
+Create a FleetUpdateStrategy
+.Example
+$stage = New-AzFleetUpdateStageObject -Name stag1 -Group @{name='group-a'} -AfterStageWaitInSecond 3600
+New-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1 -StrategyStage $stage
+.Example
+$f = Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test
+$stage2 = New-AzFleetUpdateStageObject -Name stag2 -Group @{name='group-b'} -AfterStageWaitInSecond 3600
+New-AzFleetUpdateStrategy -FleetInputObject $f -Name strategy3 -StrategyStage $stage2
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetUpdateStrategy
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+STRATEGYSTAGE : The list of stages that compose this update run. Min size: 1.
+ Name : The name of the stage. Must be unique within the UpdateRun.
+ [AfterStageWaitInSecond ]: The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified.
+ [Group >]: Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1.
+ Name : Name of the group. It must match a group name of an existing fleet member.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetupdatestrategy
+#>
+function New-AzFleetUpdateStrategy {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetUpdateStrategy])]
+[CmdletBinding(DefaultParameterSetName='CreateViaIdentityExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the UpdateStrategy resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath')]
+ [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if an entity matches this string.
+ ${IfMatch},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if no entity matches this string.
+ ${IfNoneMatch},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[]]
+ # The list of stages that compose this update run.
+ # Min size: 1.
+ # To construct, see NOTES section for STRATEGYSTAGE properties and create a hash table.
+ ${StrategyStage},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Fleet.private\New-AzFleetUpdateStrategy_CreateExpanded';
+ CreateViaIdentityExpanded = 'Az.Fleet.private\New-AzFleetUpdateStrategy_CreateViaIdentityExpanded';
+ CreateViaIdentityFleetExpanded = 'Az.Fleet.private\New-AzFleetUpdateStrategy_CreateViaIdentityFleetExpanded';
+ CreateViaJsonFilePath = 'Az.Fleet.private\New-AzFleetUpdateStrategy_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.Fleet.private\New-AzFleetUpdateStrategy_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..5a2c7745f757
--- /dev/null
+++ b/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,4897 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Lists the user credentials of a Fleet.
+.Description
+Lists the user credentials of a Fleet.
+.Example
+Get-AzFleetCredentials -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetCredentialResults
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetcredentials
+#>
+function Get-AzFleetCredentials {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetCredentialResults])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.Fleet.private\Get-AzFleetCredentials_List';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get a FleetMember
+.Description
+Get a FleetMember
+.Example
+Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name testmember
+.Example
+Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetmember
+#>
+function Get-AzFleetMember {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory)]
+ [Alias('FleetMemberName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet member resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleetMember_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleetMember_GetViaIdentity';
+ GetViaIdentityFleet = 'Az.Fleet.private\Get-AzFleetMember_GetViaIdentityFleet';
+ List = 'Az.Fleet.private\Get-AzFleetMember_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get a UpdateRun
+.Description
+Get a UpdateRun
+.Example
+Get-AzFleetUpdateRun -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+.Example
+Get-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateRun
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdaterun
+#>
+function Get-AzFleetUpdateRun {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateRun])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory)]
+ [Alias('UpdateRunName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the UpdateRun resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleetUpdateRun_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleetUpdateRun_GetViaIdentity';
+ GetViaIdentityFleet = 'Az.Fleet.private\Get-AzFleetUpdateRun_GetViaIdentityFleet';
+ List = 'Az.Fleet.private\Get-AzFleetUpdateRun_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get a FleetUpdateStrategy
+.Description
+Get a FleetUpdateStrategy
+.Example
+Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test
+.Example
+Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetUpdateStrategy
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdatestrategy
+#>
+function Get-AzFleetUpdateStrategy {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetUpdateStrategy])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the UpdateStrategy resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityFleet', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_GetViaIdentity';
+ GetViaIdentityFleet = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_GetViaIdentityFleet';
+ List = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Gets a Fleet.
+.Description
+Gets a Fleet.
+.Example
+Get-AzFleet
+.Example
+Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet
+.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.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/get-azfleet
+#>
+function Get-AzFleet {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('FleetName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Fleet.private\Get-AzFleet_Get';
+ GetViaIdentity = 'Az.Fleet.private\Get-AzFleet_GetViaIdentity';
+ List = 'Az.Fleet.private\Get-AzFleet_List';
+ List1 = 'Az.Fleet.private\Get-AzFleet_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Create a FleetMember
+.Description
+Create a FleetMember
+.Example
+New-AzFleetMember -FleetName testfleet01 -Name testmember -ResourceGroupName K8sFleet-Test -ClusterResourceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/K8sFleet-Test/providers/microsoft.containerservice/managedClusters/TestCluster01
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetmember
+#>
+function New-AzFleetMember {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetMember])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet resource.
+ ${FleetName},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Alias('FleetMemberName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the Fleet member resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath')]
+ [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table.
+ ${FleetInputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if an entity matches this string.
+ ${IfMatch},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')]
+ [System.String]
+ # The request should only proceed if no entity matches this string.
+ ${IfNoneMatch},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The ARM resource id of the cluster that joins the Fleet.
+ # Must be a valid Azure resource id.
+ # e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ ${ClusterResourceId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityFleetExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # The group this member belongs to for multi-cluster update management.
+ ${Group},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Fleet.private\New-AzFleetMember_CreateExpanded';
+ CreateViaIdentityExpanded = 'Az.Fleet.private\New-AzFleetMember_CreateViaIdentityExpanded';
+ CreateViaIdentityFleetExpanded = 'Az.Fleet.private\New-AzFleetMember_CreateViaIdentityFleetExpanded';
+ CreateViaJsonFilePath = 'Az.Fleet.private\New-AzFleetMember_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.Fleet.private\New-AzFleetMember_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Fleet.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Create a UpdateRun
+.Description
+Create a UpdateRun
+.Example
+New-AzFleetUpdateRun -FleetName testfleet01 -Name run1 -ResourceGroupName K8sFleet-Test -UpgradeType Full -UpgradeKubernetesVersion "1.26.1" -NodeImageSelectionType Latest
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateRun
+.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.
+
+FLEETINPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+INPUTOBJECT : Identity Parameter
+ [FleetMemberName ]: The name of the Fleet member resource.
+ [FleetName ]: The name of the Fleet resource.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [UpdateRunName ]: The name of the UpdateRun resource.
+ [UpdateStrategyName ]: The name of the UpdateStrategy resource.
+
+STRATEGYSTAGE : The list of stages that compose this update run. Min size: 1.
+ Name : The name of the stage. Must be unique within the UpdateRun.
+ [AfterStageWaitInSecond ]: The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified.
+ [Group