diff --git a/src/Fleet/Fleet.Autorest/README.md b/src/Fleet/Fleet.Autorest/README.md index 0916fb570f62..ffdf425b39d6 100644 --- a/src/Fleet/Fleet.Autorest/README.md +++ b/src/Fleet/Fleet.Autorest/README.md @@ -3,7 +3,6 @@ This directory contains the PowerShell module for the Fleet service. --- - ## Info - Modifiable: yes - Generated: all diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1 index c11d3178f817..6edce6be3932 100644 --- a/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1 @@ -76,7 +76,6 @@ param( [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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1 index 55046839297e..0f33a194fe85 100644 --- a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1 @@ -92,14 +92,12 @@ param( [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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1 index eca1f3fb44d5..2478ae1d563a 100644 --- a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1 @@ -92,14 +92,12 @@ param( [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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1 index 39f5c989019d..3ad683edf736 100644 --- a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1 @@ -91,14 +91,12 @@ param( [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()] diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1 index b643d7a2853f..4f2647cea8f5 100644 --- a/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1 @@ -77,7 +77,6 @@ param( [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()] @@ -101,11 +100,10 @@ param( [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}, + [System.Management.Automation.SwitchParameter] + # Decides if enable a system assigned identity for the resource. + ${EnableSystemAssignedIdentity}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] @@ -117,12 +115,11 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [AllowEmptyCollection()] [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. + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1 index 3703ada2e1d7..4a14e8bd8707 100644 --- a/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1 @@ -95,14 +95,12 @@ param( [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()] diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1 index 1433b1a89361..8d57cc087e9e 100644 --- a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1 @@ -101,14 +101,12 @@ param( [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()] @@ -149,7 +147,6 @@ param( [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')] diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStageObject.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStageObject.ps1 index 2106aa46e3df..861aa7fa3214 100644 --- a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStageObject.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStageObject.ps1 @@ -63,7 +63,6 @@ param( # 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} ) diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStrategy.ps1 index fdeafd2cfc0d..bd947b0b5b1a 100644 --- a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStrategy.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateStrategy.ps1 @@ -105,14 +105,12 @@ param( [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()] @@ -135,7 +133,6 @@ param( [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)] diff --git a/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 index 5a2c7745f757..984226dd878b 100644 --- a/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -259,14 +259,12 @@ param( [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()] @@ -480,14 +478,12 @@ param( [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()] @@ -700,14 +696,12 @@ param( [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()] @@ -905,7 +899,6 @@ param( [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()] @@ -1122,14 +1115,12 @@ param( [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()] @@ -1407,14 +1398,12 @@ param( [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()] @@ -1455,7 +1444,6 @@ param( [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')] @@ -1730,14 +1718,12 @@ param( [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()] @@ -1760,7 +1746,6 @@ param( [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)] @@ -1984,7 +1969,6 @@ param( [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()] @@ -2008,11 +1992,10 @@ param( [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}, + [System.Management.Automation.SwitchParameter] + # Decides if enable a system assigned identity for the resource. + ${EnableSystemAssignedIdentity}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] @@ -2024,12 +2007,11 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [AllowEmptyCollection()] [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. + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] @@ -2265,14 +2247,12 @@ param( [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='DeleteViaIdentityFleet', 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()] @@ -2504,14 +2484,12 @@ param( [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='DeleteViaIdentityFleet', 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()] @@ -2745,14 +2723,12 @@ param( [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='DeleteViaIdentityFleet', 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()] @@ -2971,7 +2947,6 @@ param( [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()] @@ -3202,14 +3177,12 @@ param( [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='StartViaIdentityFleet', 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()] @@ -3435,14 +3408,12 @@ param( [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='StopViaIdentityFleet', 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()] @@ -3679,14 +3650,12 @@ param( [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='UpdateViaIdentityFleetExpanded', 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()] @@ -3895,12 +3864,6 @@ INPUTOBJECT : Identity Parameter [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/update-azfleetupdaterun #> @@ -3940,14 +3903,12 @@ param( [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='UpdateViaIdentityFleetExpanded', 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()] @@ -3962,48 +3923,6 @@ param( # The request should only proceed if no entity matches this string. ${IfNoneMatch}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Latest", "Consistent")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # The node image upgrade type. - ${NodeImageSelectionType}, - - [Parameter()] - [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()] - [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()] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # The Kubernetes version to upgrade the member clusters to. - ${UpgradeKubernetesVersion}, - - [Parameter()] - [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()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4187,12 +4106,6 @@ INPUTOBJECT : Identity Parameter [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/update-azfleetupdatestrategy #> @@ -4231,14 +4144,12 @@ param( [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='UpdateViaIdentityFleetExpanded', 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()] @@ -4253,15 +4164,6 @@ param( # The request should only proceed if no entity matches this string. ${IfNoneMatch}, - [Parameter()] - [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()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4408,9 +4310,9 @@ end { <# .Synopsis -Update a Fleet +Create a Fleet. .Description -Update a Fleet +Create a Fleet. .Example Update-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test -Tag @{"123"="abc"} @@ -4439,8 +4341,6 @@ function Update-AzFleet { [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('FleetName')] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')] [System.String] @@ -4448,8 +4348,6 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')] [System.String] # The name of the resource group. @@ -4457,8 +4355,6 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaJsonFilePath')] - [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -4469,7 +4365,6 @@ param( [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()] @@ -4478,44 +4373,33 @@ param( # The request should only proceed if an entity matches this string. ${IfMatch}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')] [System.String] - # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - ${IdentityType}, + # The request should only proceed if no entity matches this string. + ${IfNoneMatch}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatchTags]))] + [System.Nullable[System.Boolean]] + # Decides if enable a system assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter()] + [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='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter()] + [AllowEmptyCollection()] [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. + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # Path of Json file supplied to the Update operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # Json string supplied to the Update operation - ${JsonString}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4605,10 +4489,8 @@ begin { $mapping = @{ UpdateExpanded = 'Az.Fleet.private\Update-AzFleet_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Fleet.private\Update-AzFleet_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.Fleet.private\Update-AzFleet_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.Fleet.private\Update-AzFleet_UpdateViaJsonString'; } - if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -4814,7 +4696,6 @@ param( # 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} ) diff --git a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleet.ps1 index 35583083302f..03c987b149cc 100644 --- a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleet.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleet.ps1 @@ -74,7 +74,6 @@ param( [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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetMember.ps1 index ab2186856fcb..01904208495f 100644 --- a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetMember.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetMember.ps1 @@ -90,14 +90,12 @@ param( [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='DeleteViaIdentityFleet', 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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateRun.ps1 index 2caedc7b2477..0c8ee24f1ded 100644 --- a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateRun.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateRun.ps1 @@ -87,14 +87,12 @@ param( [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='DeleteViaIdentityFleet', 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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateStrategy.ps1 index f438c7fefd32..e835d0850edb 100644 --- a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateStrategy.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateStrategy.ps1 @@ -89,14 +89,12 @@ param( [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='DeleteViaIdentityFleet', 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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Start-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Start-AzFleetUpdateRun.ps1 index 20cd67f76155..e8c10e2511b3 100644 --- a/src/Fleet/Fleet.Autorest/exports/Start-AzFleetUpdateRun.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Start-AzFleetUpdateRun.ps1 @@ -87,14 +87,12 @@ param( [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='StartViaIdentityFleet', 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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Stop-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Stop-AzFleetUpdateRun.ps1 index dc85036de975..cb2b54238e89 100644 --- a/src/Fleet/Fleet.Autorest/exports/Stop-AzFleetUpdateRun.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Stop-AzFleetUpdateRun.ps1 @@ -87,14 +87,12 @@ param( [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='StopViaIdentityFleet', 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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleet.ps1 index 111ea06e29ba..34201f0e2243 100644 --- a/src/Fleet/Fleet.Autorest/exports/Update-AzFleet.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Update-AzFleet.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Update a Fleet +Create a Fleet. .Description -Update a Fleet +Create a Fleet. .Example Update-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test -Tag @{"123"="abc"} @@ -47,8 +47,6 @@ function Update-AzFleet { [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('FleetName')] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')] [System.String] @@ -56,8 +54,6 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')] [System.String] # The name of the resource group. @@ -65,8 +61,6 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaJsonFilePath')] - [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -77,7 +71,6 @@ param( [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()] @@ -86,44 +79,33 @@ param( # The request should only proceed if an entity matches this string. ${IfMatch}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Header')] [System.String] - # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - ${IdentityType}, + # The request should only proceed if no entity matches this string. + ${IfNoneMatch}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] + [System.Nullable[System.Boolean]] + # Decides if enable a system assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatchTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter()] + [AllowEmptyCollection()] [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. + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # Path of Json file supplied to the Update operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # Json string supplied to the Update operation - ${JsonString}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -213,10 +195,8 @@ begin { $mapping = @{ UpdateExpanded = 'Az.Fleet.private\Update-AzFleet_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Fleet.private\Update-AzFleet_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.Fleet.private\Update-AzFleet_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.Fleet.private\Update-AzFleet_UpdateViaJsonString'; } - if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetMember.ps1 index 216a290fcc4c..91eb461579a6 100644 --- a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetMember.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetMember.ps1 @@ -98,14 +98,12 @@ param( [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='UpdateViaIdentityFleetExpanded', 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()] diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 index 4ee2ee72a7c1..846170205297 100644 --- a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 @@ -48,12 +48,6 @@ INPUTOBJECT : Identity Parameter [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/update-azfleetupdaterun #> @@ -93,14 +87,12 @@ param( [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='UpdateViaIdentityFleetExpanded', 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()] @@ -115,48 +107,6 @@ param( # The request should only proceed if no entity matches this string. ${IfNoneMatch}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Latest", "Consistent")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # The node image upgrade type. - ${NodeImageSelectionType}, - - [Parameter()] - [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()] - [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()] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category('Body')] - [System.String] - # The Kubernetes version to upgrade the member clusters to. - ${UpgradeKubernetesVersion}, - - [Parameter()] - [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()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 index 5927e489ec51..ac6d92a8aaf2 100644 --- a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 @@ -53,12 +53,6 @@ INPUTOBJECT : Identity Parameter [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/update-azfleetupdatestrategy #> @@ -97,14 +91,12 @@ param( [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='UpdateViaIdentityFleetExpanded', 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()] @@ -119,15 +111,6 @@ param( # The request should only proceed if no entity matches this string. ${IfNoneMatch}, - [Parameter()] - [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()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/src/Fleet/Fleet.Autorest/generated/Module.cs b/src/Fleet/Fleet.Autorest/generated/Module.cs index cd6251c35862..c2cc30777cb9 100644 --- a/src/Fleet/Fleet.Autorest/generated/Module.cs +++ b/src/Fleet/Fleet.Autorest/generated/Module.cs @@ -26,12 +26,20 @@ public partial class Module public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.HttpPipeline _pipelineWithProxy; + private static readonly global::System.Object _singletonLock = new global::System.Object(); + public bool _useProxy = false; public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); @@ -51,11 +59,8 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } - /// Backing field for property. - private static Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module public string Name => @"Az.Fleet"; @@ -117,9 +122,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.HttpPipeline CreatePipel /// Initialization steps performed after the module is loaded. public void Init() { - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); - CustomInit(); + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } } /// Creates the module instance. diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateExpanded.cs index d0d23e0f886c..83d63cf70482 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateExpanded.cs @@ -78,6 +78,10 @@ public partial class NewAzFleet_CreateExpanded : global::System.Management.Autom [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Decides if enable a system assigned identity for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Decides if enable a system assigned identity for the resource.")] + public global::System.Management.Automation.SwitchParameter EnableSystemAssignedIdentity { set => _resourceBody.IdentityType = value.IsPresent ? "SystemAssigned": null ; } + /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -93,20 +97,6 @@ public partial class NewAzFleet_CreateExpanded : global::System.Management.Autom [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned")] - public string IdentityType { get => _resourceBody.IdentityType ?? null; set => _resourceBody.IdentityType = value; } - /// Backing field for property. private string _ifMatch; @@ -247,20 +237,12 @@ public partial class NewAzFleet_CreateExpanded : global::System.Management.Autom public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } /// - /// 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. + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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.", - SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities UserAssignedIdentity { get => _resourceBody.IdentityUserAssignedIdentity ?? null /* object */; set => _resourceBody.IdentityUserAssignedIdentity = value; } + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { get; set; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -461,6 +443,30 @@ public NewAzFleet_CreateExpanded() } + private void PreProcessManagedIdentityParameters() + { + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + foreach( var id in this.UserAssignedIdentity ) + { + _resourceBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UserAssignedIdentity()); + } + } + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate IdentityType + if ("SystemAssigned".Equals(_resourceBody.IdentityType, StringComparison.InvariantCultureIgnoreCase)) + { + _resourceBody.IdentityType = "SystemAssigned,UserAssigned"; + } + else + { + _resourceBody.IdentityType = "UserAssigned"; + } + } + } + /// Performs execution of the command. protected override void ProcessRecord() { @@ -533,6 +539,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + this.PreProcessManagedIdentityParameters(); await this.Client.FleetsCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaIdentityExpanded.cs index b68c1720088a..50aa18a1bfc8 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaIdentityExpanded.cs @@ -78,6 +78,10 @@ public partial class NewAzFleet_CreateViaIdentityExpanded : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Decides if enable a system assigned identity for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Decides if enable a system assigned identity for the resource.")] + public global::System.Management.Automation.SwitchParameter EnableSystemAssignedIdentity { set => _resourceBody.IdentityType = value.IsPresent ? "SystemAssigned": null ; } + /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -93,20 +97,6 @@ public partial class NewAzFleet_CreateViaIdentityExpanded : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned")] - public string IdentityType { get => _resourceBody.IdentityType ?? null; set => _resourceBody.IdentityType = value; } - /// Backing field for property. private string _ifMatch; @@ -207,20 +197,12 @@ public partial class NewAzFleet_CreateViaIdentityExpanded : global::System.Manag public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } /// - /// 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. + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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.", - SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities UserAssignedIdentity { get => _resourceBody.IdentityUserAssignedIdentity ?? null /* object */; set => _resourceBody.IdentityUserAssignedIdentity = value; } + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { get; set; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -418,6 +400,30 @@ public NewAzFleet_CreateViaIdentityExpanded() } + private void PreProcessManagedIdentityParameters() + { + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + foreach( var id in this.UserAssignedIdentity ) + { + _resourceBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UserAssignedIdentity()); + } + } + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate IdentityType + if ("SystemAssigned".Equals(_resourceBody.IdentityType, StringComparison.InvariantCultureIgnoreCase)) + { + _resourceBody.IdentityType = "SystemAssigned,UserAssigned"; + } + else + { + _resourceBody.IdentityType = "UserAssigned"; + } + } + } + /// Performs execution of the command. protected override void ProcessRecord() { @@ -492,6 +498,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { + this.PreProcessManagedIdentityParameters(); await this.Client.FleetsCreateOrUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeCreate); } else @@ -509,6 +516,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FleetName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } + this.PreProcessManagedIdentityParameters(); await this.Client.FleetsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateExpanded.cs index f7634fe1c349..e3025e5ab37d 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateExpanded.cs @@ -169,18 +169,6 @@ public partial class UpdateAzFleetUpdateRun_UpdateExpanded : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// The node image upgrade type. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The node image upgrade type.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The node image upgrade type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Latest", "Consistent")] - public string NodeImageSelectionType { get => _resourceBody.NodeImageSelectionType ?? null; set => _resourceBody.NodeImageSelectionType = value; } - /// /// The instance of the that the remote call will use. /// @@ -216,18 +204,6 @@ public partial class UpdateAzFleetUpdateRun_UpdateExpanded : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - /// The list of stages that compose this update run. Min size: 1. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of stages that compose this update run. Min size: 1.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of stages that compose this update run. Min size: 1.", - SerializedName = @"stages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] StrategyStage { get => _resourceBody.StrategyStage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.StrategyStage = (value != null ? new System.Collections.Generic.List(value) : null); } - /// Backing field for property. private string _subscriptionId; @@ -247,51 +223,6 @@ public partial class UpdateAzFleetUpdateRun_UpdateExpanded : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - /// - /// 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. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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.", - SerializedName = @"updateStrategyId", - PossibleTypes = new [] { typeof(string) })] - public string UpdateStrategyId { get => _resourceBody.UpdateStrategyId ?? null; set => _resourceBody.UpdateStrategyId = value; } - - /// The Kubernetes version to upgrade the member clusters to. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Kubernetes version to upgrade the member clusters to.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Kubernetes version to upgrade the member clusters to.", - SerializedName = @"kubernetesVersion", - PossibleTypes = new [] { typeof(string) })] - public string UpgradeKubernetesVersion { get => _resourceBody.UpgradeKubernetesVersion ?? null; set => _resourceBody.UpgradeKubernetesVersion = value; } - - /// - /// The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property - /// not to be set. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Full", "NodeImageOnly")] - public string UpgradeType { get => _resourceBody.UpgradeType ?? null; set => _resourceBody.UpgradeType = value; } - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -558,7 +489,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } _resourceBody = await this.Client.UpdateRunsGetWithResult(SubscriptionId, ResourceGroupName, FleetName, Name, this, Pipeline); this.Update_resourceBody(); - await this.Client.UpdateRunsCreateOrUpdate(SubscriptionId, ResourceGroupName, FleetName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.UpdateRunsCreateOrUpdate(SubscriptionId, ResourceGroupName, FleetName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.UndeclaredResponseException urexception) @@ -592,26 +523,7 @@ public UpdateAzFleetUpdateRun_UpdateExpanded() private void Update_resourceBody() { - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpdateStrategyId"))) - { - this.UpdateStrategyId = (string)(this.MyInvocation?.BoundParameters["UpdateStrategyId"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("StrategyStage"))) - { - this.StrategyStage = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[])(this.MyInvocation?.BoundParameters["StrategyStage"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpgradeKubernetesVersion"))) - { - this.UpgradeKubernetesVersion = (string)(this.MyInvocation?.BoundParameters["UpgradeKubernetesVersion"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("NodeImageSelectionType"))) - { - this.NodeImageSelectionType = (string)(this.MyInvocation?.BoundParameters["NodeImageSelectionType"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpgradeType"))) - { - this.UpgradeType = (string)(this.MyInvocation?.BoundParameters["UpgradeType"]); - } + } /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs index 141ce987fdb4..b4c13a17f5d9 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs @@ -148,18 +148,6 @@ public partial class UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// The node image upgrade type. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The node image upgrade type.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The node image upgrade type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Latest", "Consistent")] - public string NodeImageSelectionType { get => _resourceBody.NodeImageSelectionType ?? null; set => _resourceBody.NodeImageSelectionType = value; } - /// /// The instance of the that the remote call will use. /// @@ -181,63 +169,6 @@ public partial class UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// The list of stages that compose this update run. Min size: 1. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of stages that compose this update run. Min size: 1.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of stages that compose this update run. Min size: 1.", - SerializedName = @"stages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] StrategyStage { get => _resourceBody.StrategyStage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.StrategyStage = (value != null ? new System.Collections.Generic.List(value) : null); } - - /// - /// 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. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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.", - SerializedName = @"updateStrategyId", - PossibleTypes = new [] { typeof(string) })] - public string UpdateStrategyId { get => _resourceBody.UpdateStrategyId ?? null; set => _resourceBody.UpdateStrategyId = value; } - - /// The Kubernetes version to upgrade the member clusters to. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Kubernetes version to upgrade the member clusters to.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Kubernetes version to upgrade the member clusters to.", - SerializedName = @"kubernetesVersion", - PossibleTypes = new [] { typeof(string) })] - public string UpgradeKubernetesVersion { get => _resourceBody.UpgradeKubernetesVersion ?? null; set => _resourceBody.UpgradeKubernetesVersion = value; } - - /// - /// The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property - /// not to be set. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Full", "NodeImageOnly")] - public string UpgradeType { get => _resourceBody.UpgradeType ?? null; set => _resourceBody.UpgradeType = value; } - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -502,7 +433,7 @@ protected override void ProcessRecord() { _resourceBody = await this.Client.UpdateRunsGetViaIdentityWithResult(InputObject.Id, this, Pipeline); this.Update_resourceBody(); - await this.Client.UpdateRunsCreateOrUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.UpdateRunsCreateOrUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } else { @@ -525,7 +456,7 @@ protected override void ProcessRecord() } _resourceBody = await this.Client.UpdateRunsGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, InputObject.UpdateRunName ?? null, this, Pipeline); this.Update_resourceBody(); - await this.Client.UpdateRunsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, InputObject.UpdateRunName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.UpdateRunsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, InputObject.UpdateRunName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -560,26 +491,7 @@ public UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded() private void Update_resourceBody() { - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpdateStrategyId"))) - { - this.UpdateStrategyId = (string)(this.MyInvocation?.BoundParameters["UpdateStrategyId"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("StrategyStage"))) - { - this.StrategyStage = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[])(this.MyInvocation?.BoundParameters["StrategyStage"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpgradeKubernetesVersion"))) - { - this.UpgradeKubernetesVersion = (string)(this.MyInvocation?.BoundParameters["UpgradeKubernetesVersion"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("NodeImageSelectionType"))) - { - this.NodeImageSelectionType = (string)(this.MyInvocation?.BoundParameters["NodeImageSelectionType"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpgradeType"))) - { - this.UpgradeType = (string)(this.MyInvocation?.BoundParameters["UpgradeType"]); - } + } /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs index b9d3d229f979..fb9568bc412d 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs @@ -163,18 +163,6 @@ public partial class UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// The node image upgrade type. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The node image upgrade type.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The node image upgrade type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Latest", "Consistent")] - public string NodeImageSelectionType { get => _resourceBody.NodeImageSelectionType ?? null; set => _resourceBody.NodeImageSelectionType = value; } - /// /// The instance of the that the remote call will use. /// @@ -196,63 +184,6 @@ public partial class UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// The list of stages that compose this update run. Min size: 1. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of stages that compose this update run. Min size: 1.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of stages that compose this update run. Min size: 1.", - SerializedName = @"stages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] StrategyStage { get => _resourceBody.StrategyStage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.StrategyStage = (value != null ? new System.Collections.Generic.List(value) : null); } - - /// - /// 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. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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.", - SerializedName = @"updateStrategyId", - PossibleTypes = new [] { typeof(string) })] - public string UpdateStrategyId { get => _resourceBody.UpdateStrategyId ?? null; set => _resourceBody.UpdateStrategyId = value; } - - /// The Kubernetes version to upgrade the member clusters to. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Kubernetes version to upgrade the member clusters to.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Kubernetes version to upgrade the member clusters to.", - SerializedName = @"kubernetesVersion", - PossibleTypes = new [] { typeof(string) })] - public string UpgradeKubernetesVersion { get => _resourceBody.UpgradeKubernetesVersion ?? null; set => _resourceBody.UpgradeKubernetesVersion = value; } - - /// - /// The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property - /// not to be set. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("Full", "NodeImageOnly")] - public string UpgradeType { get => _resourceBody.UpgradeType ?? null; set => _resourceBody.UpgradeType = value; } - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -519,7 +450,7 @@ protected override void ProcessRecord() this.FleetInputObject.Id += $"/updateRuns/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; _resourceBody = await this.Client.UpdateRunsGetViaIdentityWithResult(FleetInputObject.Id, this, Pipeline); this.Update_resourceBody(); - await this.Client.UpdateRunsCreateOrUpdateViaIdentity(FleetInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.UpdateRunsCreateOrUpdateViaIdentity(FleetInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } else { @@ -538,7 +469,7 @@ protected override void ProcessRecord() } _resourceBody = await this.Client.UpdateRunsGetWithResult(FleetInputObject.SubscriptionId ?? null, FleetInputObject.ResourceGroupName ?? null, FleetInputObject.FleetName ?? null, Name, this, Pipeline); this.Update_resourceBody(); - await this.Client.UpdateRunsCreateOrUpdate(FleetInputObject.SubscriptionId ?? null, FleetInputObject.ResourceGroupName ?? null, FleetInputObject.FleetName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.UpdateRunsCreateOrUpdate(FleetInputObject.SubscriptionId ?? null, FleetInputObject.ResourceGroupName ?? null, FleetInputObject.FleetName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -573,26 +504,7 @@ public UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded() private void Update_resourceBody() { - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpdateStrategyId"))) - { - this.UpdateStrategyId = (string)(this.MyInvocation?.BoundParameters["UpdateStrategyId"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("StrategyStage"))) - { - this.StrategyStage = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[])(this.MyInvocation?.BoundParameters["StrategyStage"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpgradeKubernetesVersion"))) - { - this.UpgradeKubernetesVersion = (string)(this.MyInvocation?.BoundParameters["UpgradeKubernetesVersion"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("NodeImageSelectionType"))) - { - this.NodeImageSelectionType = (string)(this.MyInvocation?.BoundParameters["NodeImageSelectionType"]); - } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("UpgradeType"))) - { - this.UpgradeType = (string)(this.MyInvocation?.BoundParameters["UpgradeType"]); - } + } /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs index 2c74db365555..cdad74432f1e 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs @@ -205,18 +205,6 @@ public partial class UpdateAzFleetUpdateStrategy_UpdateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - /// The list of stages that compose this update run. Min size: 1. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of stages that compose this update run. Min size: 1.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of stages that compose this update run. Min size: 1.", - SerializedName = @"stages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] StrategyStage { get => _resourceBody.StrategyStage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.StrategyStage = (value != null ? new System.Collections.Generic.List(value) : null); } - /// Backing field for property. private string _subscriptionId; @@ -502,7 +490,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } _resourceBody = await this.Client.FleetUpdateStrategiesGetWithResult(SubscriptionId, ResourceGroupName, FleetName, Name, this, Pipeline); this.Update_resourceBody(); - await this.Client.FleetUpdateStrategiesCreateOrUpdate(SubscriptionId, ResourceGroupName, FleetName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.FleetUpdateStrategiesCreateOrUpdate(SubscriptionId, ResourceGroupName, FleetName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.UndeclaredResponseException urexception) @@ -536,10 +524,7 @@ public UpdateAzFleetUpdateStrategy_UpdateExpanded() private void Update_resourceBody() { - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("StrategyStage"))) - { - this.StrategyStage = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[])(this.MyInvocation?.BoundParameters["StrategyStage"]); - } + } /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs index f4960bc5a6a0..d06a45cfd574 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs @@ -171,18 +171,6 @@ public partial class UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// The list of stages that compose this update run. Min size: 1. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of stages that compose this update run. Min size: 1.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of stages that compose this update run. Min size: 1.", - SerializedName = @"stages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] StrategyStage { get => _resourceBody.StrategyStage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.StrategyStage = (value != null ? new System.Collections.Generic.List(value) : null); } - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -447,7 +435,7 @@ protected override void ProcessRecord() { _resourceBody = await this.Client.FleetUpdateStrategiesGetViaIdentityWithResult(InputObject.Id, this, Pipeline); this.Update_resourceBody(); - await this.Client.FleetUpdateStrategiesCreateOrUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.FleetUpdateStrategiesCreateOrUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } else { @@ -470,7 +458,7 @@ protected override void ProcessRecord() } _resourceBody = await this.Client.FleetUpdateStrategiesGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, InputObject.UpdateStrategyName ?? null, this, Pipeline); this.Update_resourceBody(); - await this.Client.FleetUpdateStrategiesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, InputObject.UpdateStrategyName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.FleetUpdateStrategiesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, InputObject.UpdateStrategyName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -505,10 +493,7 @@ public UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded() private void Update_resourceBody() { - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("StrategyStage"))) - { - this.StrategyStage = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[])(this.MyInvocation?.BoundParameters["StrategyStage"]); - } + } /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs index 06ade22b9cae..35070b5c9d55 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs @@ -185,18 +185,6 @@ public partial class UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// The list of stages that compose this update run. Min size: 1. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of stages that compose this update run. Min size: 1.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of stages that compose this update run. Min size: 1.", - SerializedName = @"stages", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] StrategyStage { get => _resourceBody.StrategyStage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.StrategyStage = (value != null ? new System.Collections.Generic.List(value) : null); } - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -465,7 +453,7 @@ protected override void ProcessRecord() this.FleetInputObject.Id += $"/updateStrategies/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; _resourceBody = await this.Client.FleetUpdateStrategiesGetViaIdentityWithResult(FleetInputObject.Id, this, Pipeline); this.Update_resourceBody(); - await this.Client.FleetUpdateStrategiesCreateOrUpdateViaIdentity(FleetInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.FleetUpdateStrategiesCreateOrUpdateViaIdentity(FleetInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } else { @@ -484,7 +472,7 @@ protected override void ProcessRecord() } _resourceBody = await this.Client.FleetUpdateStrategiesGetWithResult(FleetInputObject.SubscriptionId ?? null, FleetInputObject.ResourceGroupName ?? null, FleetInputObject.FleetName ?? null, Name, this, Pipeline); this.Update_resourceBody(); - await this.Client.FleetUpdateStrategiesCreateOrUpdate(FleetInputObject.SubscriptionId ?? null, FleetInputObject.ResourceGroupName ?? null, FleetInputObject.FleetName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline); + await this.Client.FleetUpdateStrategiesCreateOrUpdate(FleetInputObject.SubscriptionId ?? null, FleetInputObject.ResourceGroupName ?? null, FleetInputObject.FleetName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -519,10 +507,7 @@ public UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded() private void Update_resourceBody() { - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("StrategyStage"))) - { - this.StrategyStage = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[])(this.MyInvocation?.BoundParameters["StrategyStage"]); - } + } /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateExpanded.cs index c5a55db70a38..1dac2211e068 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Cmdlets; using System; - /// Update a Fleet + /// Create a Fleet. /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFleet_UpdateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Description(@"Update a Fleet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Description(@"Create a Fleet.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", ApiVersion = "2023-10-15")] public partial class UpdateAzFleet_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IContext @@ -43,8 +43,8 @@ public partial class UpdateAzFleet_UpdateExpanded : global::System.Management.Au /// A buffer to record first returned object in response. private object _firstResponse = null; - /// Properties of a Fleet that can be patched. - private Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatch _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetPatch(); + /// The Fleet resource. + private Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Fleet(); /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. @@ -78,6 +78,10 @@ public partial class UpdateAzFleet_UpdateExpanded : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Decides if enable a system assigned identity for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Decides if enable a system assigned identity for the resource.")] + public System.Boolean? EnableSystemAssignedIdentity { get; set; } + /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -93,20 +97,6 @@ public partial class UpdateAzFleet_UpdateExpanded : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned")] - public string IdentityType { get => _propertiesBody.IdentityType ?? null; set => _propertiesBody.IdentityType = value; } - /// Backing field for property. private string _ifMatch; @@ -121,6 +111,20 @@ public partial class UpdateAzFleet_UpdateExpanded : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Header)] public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + /// Backing field for property. + private string _ifNoneMatch; + + /// The request should only proceed if no entity matches this string. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The request should only proceed if no entity matches this string.")] + [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request should only proceed if no entity matches this string.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -218,24 +222,16 @@ public partial class UpdateAzFleet_UpdateExpanded : global::System.Management.Au ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatchTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatchTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } /// - /// 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. + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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.", - SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities UserAssignedIdentity { get => _propertiesBody.IdentityUserAssignedIdentity ?? null /* object */; set => _propertiesBody.IdentityUserAssignedIdentity = value; } + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { get; set; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -296,10 +292,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets.UpdateAzFleet_UpdateExpa clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone._propertiesBody = this._propertiesBody; + clone._resourceBody = this._resourceBody; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.IfMatch = this.IfMatch; + clone.IfNoneMatch = this.IfNoneMatch; clone.Name = this.Name; return clone; } @@ -427,6 +424,43 @@ protected override void EndProcessing() } } + private void PreProcessManagedIdentityParametersWithGetResult() + { + bool supportsSystemAssignedIdentity = (true == this.EnableSystemAssignedIdentity || null == this.EnableSystemAssignedIdentity && true == _resourceBody?.IdentityType?.Contains("SystemAssigned")); + bool supportsUserAssignedIdentity = false; + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + foreach( var id in this.UserAssignedIdentity ) + { + _resourceBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UserAssignedIdentity()); + } + } + supportsUserAssignedIdentity = true == this.MyInvocation?.BoundParameters?.ContainsKey("UserAssignedIdentity") && this.UserAssignedIdentity?.Length > 0 || + true != this.MyInvocation?.BoundParameters?.ContainsKey("UserAssignedIdentity") && true == _resourceBody.IdentityType?.Contains("UserAssigned"); + if (!supportsUserAssignedIdentity) + { + _resourceBody.IdentityUserAssignedIdentity = null; + } + // calculate IdentityType + if ((supportsUserAssignedIdentity && supportsSystemAssignedIdentity)) + { + _resourceBody.IdentityType = "SystemAssigned,UserAssigned"; + } + else if ((supportsUserAssignedIdentity && !supportsSystemAssignedIdentity)) + { + _resourceBody.IdentityType = "UserAssigned"; + } + else if ((!supportsUserAssignedIdentity && supportsSystemAssignedIdentity)) + { + _resourceBody.IdentityType = "SystemAssigned"; + } + else + { + _resourceBody.IdentityType = "None"; + } + } + /// Performs execution of the command. protected override void ProcessRecord() { @@ -435,7 +469,7 @@ protected override void ProcessRecord() try { // work - if (ShouldProcess($"Call remote 'FleetsUpdate' operation")) + if (ShouldProcess($"Call remote 'FleetsCreateOrUpdate' operation")) { if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) { @@ -499,12 +533,15 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FleetsUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); + _resourceBody = await this.Client.FleetsGetWithResult(SubscriptionId, ResourceGroupName, Name, this, Pipeline); + this.PreProcessManagedIdentityParametersWithGetResult(); + this.Update_resourceBody(); + await this.Client.FleetsCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -531,6 +568,14 @@ public UpdateAzFleet_UpdateExpanded() } + private void Update_resourceBody() + { + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Tag"))) + { + this.Tag = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags)(this.MyInvocation?.BoundParameters["Tag"]); + } + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaIdentityExpanded.cs index cb203a46f0c9..d82295ec9ac8 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaIdentityExpanded.cs @@ -10,15 +10,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Cmdlets; using System; - /// Update a Fleet + /// Create a Fleet. /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFleet_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Description(@"Update a Fleet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Description(@"Create a Fleet.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", ApiVersion = "2023-10-15")] public partial class UpdateAzFleet_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IContext @@ -43,8 +43,8 @@ public partial class UpdateAzFleet_UpdateViaIdentityExpanded : global::System.Ma /// A buffer to record first returned object in response. private object _firstResponse = null; - /// Properties of a Fleet that can be patched. - private Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatch _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.FleetPatch(); + /// The Fleet resource. + private Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.Fleet(); /// /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. @@ -78,6 +78,10 @@ public partial class UpdateAzFleet_UpdateViaIdentityExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Decides if enable a system assigned identity for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Decides if enable a system assigned identity for the resource.")] + public System.Boolean? EnableSystemAssignedIdentity { get; set; } + /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } @@ -93,20 +97,6 @@ public partial class UpdateAzFleet_UpdateViaIdentityExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned")] - public string IdentityType { get => _propertiesBody.IdentityType ?? null; set => _propertiesBody.IdentityType = value; } - /// Backing field for property. private string _ifMatch; @@ -121,6 +111,20 @@ public partial class UpdateAzFleet_UpdateViaIdentityExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Header)] public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + /// Backing field for property. + private string _ifNoneMatch; + + /// The request should only proceed if no entity matches this string. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The request should only proceed if no entity matches this string.")] + [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request should only proceed if no entity matches this string.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity _inputObject; @@ -178,24 +182,16 @@ public partial class UpdateAzFleet_UpdateViaIdentityExpanded : global::System.Ma ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatchTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetPatchTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } /// - /// 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. + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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.", - SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUserAssignedIdentities UserAssignedIdentity { get => _propertiesBody.IdentityUserAssignedIdentity ?? null /* object */; set => _propertiesBody.IdentityUserAssignedIdentity = value; } + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { get; set; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -256,8 +252,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets.UpdateAzFleet_UpdateViaI clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone._propertiesBody = this._propertiesBody; + clone._resourceBody = this._resourceBody; clone.IfMatch = this.IfMatch; + clone.IfNoneMatch = this.IfNoneMatch; return clone; } @@ -384,6 +381,43 @@ protected override void EndProcessing() } } + private void PreProcessManagedIdentityParametersWithGetResult() + { + bool supportsSystemAssignedIdentity = (true == this.EnableSystemAssignedIdentity || null == this.EnableSystemAssignedIdentity && true == _resourceBody?.IdentityType?.Contains("SystemAssigned")); + bool supportsUserAssignedIdentity = false; + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + foreach( var id in this.UserAssignedIdentity ) + { + _resourceBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UserAssignedIdentity()); + } + } + supportsUserAssignedIdentity = true == this.MyInvocation?.BoundParameters?.ContainsKey("UserAssignedIdentity") && this.UserAssignedIdentity?.Length > 0 || + true != this.MyInvocation?.BoundParameters?.ContainsKey("UserAssignedIdentity") && true == _resourceBody.IdentityType?.Contains("UserAssigned"); + if (!supportsUserAssignedIdentity) + { + _resourceBody.IdentityUserAssignedIdentity = null; + } + // calculate IdentityType + if ((supportsUserAssignedIdentity && supportsSystemAssignedIdentity)) + { + _resourceBody.IdentityType = "SystemAssigned,UserAssigned"; + } + else if ((supportsUserAssignedIdentity && !supportsSystemAssignedIdentity)) + { + _resourceBody.IdentityType = "UserAssigned"; + } + else if ((!supportsUserAssignedIdentity && supportsSystemAssignedIdentity)) + { + _resourceBody.IdentityType = "SystemAssigned"; + } + else + { + _resourceBody.IdentityType = "None"; + } + } + /// Performs execution of the command. protected override void ProcessRecord() { @@ -392,7 +426,7 @@ protected override void ProcessRecord() try { // work - if (ShouldProcess($"Call remote 'FleetsUpdate' operation")) + if (ShouldProcess($"Call remote 'FleetsCreateOrUpdate' operation")) { if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) { @@ -458,7 +492,10 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.FleetsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); + _resourceBody = await this.Client.FleetsGetViaIdentityWithResult(InputObject.Id, this, Pipeline); + this.PreProcessManagedIdentityParametersWithGetResult(); + this.Update_resourceBody(); + await this.Client.FleetsCreateOrUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } else { @@ -475,13 +512,16 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FleetName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.FleetsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); + _resourceBody = await this.Client.FleetsGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, this, Pipeline); + this.PreProcessManagedIdentityParametersWithGetResult(); + this.Update_resourceBody(); + await this.Client.FleetsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.FleetName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -508,6 +548,14 @@ public UpdateAzFleet_UpdateViaIdentityExpanded() } + private void Update_resourceBody() + { + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Tag"))) + { + this.Tag = (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.ITrackedResourceTags)(this.MyInvocation?.BoundParameters["Tag"]); + } + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonFilePath.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonFilePath.cs deleted file mode 100644 index 991a0f1542ca..000000000000 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonFilePath.cs +++ /dev/null @@ -1,589 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Cmdlets; - using System; - - /// Update a Fleet - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFleet_UpdateViaJsonFilePath", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Description(@"Update a Fleet")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", ApiVersion = "2023-10-15")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.NotSuggestDefaultParameterSet] - public partial class UpdateAzFleet_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - public global::System.String _jsonString; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Fleet Client => Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private string _ifMatch; - - /// The request should only proceed if an entity matches this string. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The request should only proceed if an entity matches this string.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The request should only proceed if an entity matches this string.", - SerializedName = @"If-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Header)] - public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonFilePath; - - /// Path of Json file supplied to the Update operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Path of Json file supplied to the Update operation", - SerializedName = @"JsonFilePath", - PossibleTypes = new [] { typeof(string) })] - public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Fleet resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Fleet resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Fleet resource.", - SerializedName = @"fleetName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("FleetName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of UpdateAzFleet_UpdateViaJsonFilePath - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets.UpdateAzFleet_UpdateViaJsonFilePath Clone() - { - var clone = new UpdateAzFleet_UpdateViaJsonFilePath(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.IfMatch = this.IfMatch; - clone.Name = this.Name; - clone.JsonFilePath = this.JsonFilePath; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'FleetsUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FleetsUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzFleet_UpdateViaJsonFilePath() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonString.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonString.cs deleted file mode 100644 index fc55612c99f9..000000000000 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonString.cs +++ /dev/null @@ -1,587 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Cmdlets; - using System; - - /// Update a Fleet - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFleet_UpdateViaJsonString", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Description(@"Update a Fleet")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}", ApiVersion = "2023-10-15")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.NotSuggestDefaultParameterSet] - public partial class UpdateAzFleet_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Fleet Client => Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private string _ifMatch; - - /// The request should only proceed if an entity matches this string. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The request should only proceed if an entity matches this string.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The request should only proceed if an entity matches this string.", - SerializedName = @"If-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Header)] - public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonString; - - /// Json string supplied to the Update operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Json string supplied to the Update operation", - SerializedName = @"JsonString", - PossibleTypes = new [] { typeof(string) })] - public string JsonString { get => this._jsonString; set => this._jsonString = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Fleet resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Fleet resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Fleet resource.", - SerializedName = @"fleetName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("FleetName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Fleet.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of UpdateAzFleet_UpdateViaJsonString - public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Cmdlets.UpdateAzFleet_UpdateViaJsonString Clone() - { - var clone = new UpdateAzFleet_UpdateViaJsonString(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.IfMatch = this.IfMatch; - clone.Name = this.Name; - clone.JsonString = this.JsonString; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'FleetsUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FleetsUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzFleet_UpdateViaJsonString() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleet - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index e00f78dda30c..897548b455ec 100644 --- a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 5888df741868..4cbe7c9753fb 100644 --- a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 2841b71cc3cd..5517766941b8 100644 --- a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -188,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -295,6 +296,7 @@ private string GetDefaultValuesStatements() } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput diff --git a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index ec24f93a4e76..d7822ddbe450 100644 --- a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +49,6 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } - public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -84,7 +83,6 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; - OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -258,7 +256,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -311,10 +308,10 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}"; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type - description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + description = description.NormalizeNewLines(); // Make an InfoAttribute for processing only if one isn't provided InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; // Set the description if the InfoAttribute does not have one since they are exported without a description @@ -334,7 +331,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -351,7 +348,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -440,7 +437,7 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } - internal class PSArgumentCompleterInfo: CompleterInfo + internal class PSArgumentCompleterInfo : CompleterInfo { public string[] ResourceTypes { get; } @@ -511,7 +508,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; diff --git a/src/Fleet/Fleet.Autorest/help/Az.Fleet.md b/src/Fleet/Fleet.Autorest/help/Az.Fleet.md index e14e8b753d10..9096a1ebbe03 100644 --- a/src/Fleet/Fleet.Autorest/help/Az.Fleet.md +++ b/src/Fleet/Fleet.Autorest/help/Az.Fleet.md @@ -63,7 +63,7 @@ Starts an UpdateRun. Stops an UpdateRun. ### [Update-AzFleet](Update-AzFleet.md) -Update a Fleet +Create a Fleet. ### [Update-AzFleetMember](Update-AzFleetMember.md) Update a FleetMember diff --git a/src/Fleet/Fleet.Autorest/help/Get-AzFleet.md b/src/Fleet/Fleet.Autorest/help/Get-AzFleet.md index a71c1a8d3a54..20b0b95d7b08 100644 --- a/src/Fleet/Fleet.Autorest/help/Get-AzFleet.md +++ b/src/Fleet/Fleet.Autorest/help/Get-AzFleet.md @@ -103,7 +103,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Get-AzFleetMember.md b/src/Fleet/Fleet.Autorest/help/Get-AzFleetMember.md index 6569dfe77d6a..b41db65eae3b 100644 --- a/src/Fleet/Fleet.Autorest/help/Get-AzFleetMember.md +++ b/src/Fleet/Fleet.Autorest/help/Get-AzFleetMember.md @@ -100,7 +100,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -131,7 +130,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateRun.md index 4b4a44c49232..a0e28d14da6c 100644 --- a/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateRun.md @@ -148,7 +148,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -179,7 +178,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateStrategy.md index ab7ce25663dd..223e3389dc0b 100644 --- a/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet.Autorest/help/Get-AzFleetUpdateStrategy.md @@ -107,7 +107,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -138,7 +137,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/New-AzFleet.md b/src/Fleet/Fleet.Autorest/help/New-AzFleet.md index 40b45777d50c..89a2af130793 100644 --- a/src/Fleet/Fleet.Autorest/help/New-AzFleet.md +++ b/src/Fleet/Fleet.Autorest/help/New-AzFleet.md @@ -15,16 +15,16 @@ Create a Fleet. ### CreateExpanded (Default) ``` New-AzFleet -Name -ResourceGroupName -Location [-SubscriptionId ] - [-IfMatch ] [-IfNoneMatch ] [-IdentityType ] [-Tag ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [-IfMatch ] [-IfNoneMatch ] [-EnableSystemAssignedIdentity] [-Tag ] + [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### CreateViaIdentityExpanded ``` New-AzFleet -InputObject -Location [-IfMatch ] [-IfNoneMatch ] - [-IdentityType ] [-Tag ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-EnableSystemAssignedIdentity] [-Tag ] [-UserAssignedIdentity ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### CreateViaJsonFilePath @@ -109,11 +109,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: System.String +Type: System.Management.Automation.SwitchParameter Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: @@ -156,7 +156,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -292,12 +291,11 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -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. +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable +Type: System.String[] Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: diff --git a/src/Fleet/Fleet.Autorest/help/New-AzFleetMember.md b/src/Fleet/Fleet.Autorest/help/New-AzFleetMember.md index e35a39ec029f..6a32836312e9 100644 --- a/src/Fleet/Fleet.Autorest/help/New-AzFleetMember.md +++ b/src/Fleet/Fleet.Autorest/help/New-AzFleetMember.md @@ -128,7 +128,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -204,7 +203,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateRun.md index 152f352869ba..69e61dcc8484 100644 --- a/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateRun.md @@ -158,7 +158,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -219,7 +218,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -327,7 +325,6 @@ Accept wildcard characters: False ### -StrategyStage 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. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] diff --git a/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStageObject.md b/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStageObject.md index cf16700abbc6..2f973f282512 100644 --- a/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStageObject.md +++ b/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStageObject.md @@ -81,7 +81,6 @@ Accept wildcard characters: False 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. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateGroup[] diff --git a/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStrategy.md index 3e6238a84682..6c8ab93f377f 100644 --- a/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet.Autorest/help/New-AzFleetUpdateStrategy.md @@ -155,7 +155,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -216,7 +215,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -309,7 +307,6 @@ Accept wildcard characters: False ### -StrategyStage 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. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] diff --git a/src/Fleet/Fleet.Autorest/help/Remove-AzFleet.md b/src/Fleet/Fleet.Autorest/help/Remove-AzFleet.md index 0bb52084884a..11c39de4af6d 100644 --- a/src/Fleet/Fleet.Autorest/help/Remove-AzFleet.md +++ b/src/Fleet/Fleet.Autorest/help/Remove-AzFleet.md @@ -94,7 +94,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Remove-AzFleetMember.md b/src/Fleet/Fleet.Autorest/help/Remove-AzFleetMember.md index 986a923a7d8b..b101b8d6f488 100644 --- a/src/Fleet/Fleet.Autorest/help/Remove-AzFleetMember.md +++ b/src/Fleet/Fleet.Autorest/help/Remove-AzFleetMember.md @@ -86,7 +86,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -132,7 +131,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateRun.md index ef89003a77f9..d32ef83c3a37 100644 --- a/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateRun.md @@ -78,7 +78,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -124,7 +123,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateStrategy.md index abd3cc32e58b..3b96244248d8 100644 --- a/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet.Autorest/help/Remove-AzFleetUpdateStrategy.md @@ -87,7 +87,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -133,7 +132,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Start-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/help/Start-AzFleetUpdateRun.md index f768fc506325..bc871ddd31ee 100644 --- a/src/Fleet/Fleet.Autorest/help/Start-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet.Autorest/help/Start-AzFleetUpdateRun.md @@ -139,7 +139,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -185,7 +184,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Stop-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/help/Stop-AzFleetUpdateRun.md index 48a1c1940b13..e74b9c43d998 100644 --- a/src/Fleet/Fleet.Autorest/help/Stop-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet.Autorest/help/Stop-AzFleetUpdateRun.md @@ -144,7 +144,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -190,7 +189,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Update-AzFleet.md b/src/Fleet/Fleet.Autorest/help/Update-AzFleet.md index ee1f0ff9ad1e..5a0332359542 100644 --- a/src/Fleet/Fleet.Autorest/help/Update-AzFleet.md +++ b/src/Fleet/Fleet.Autorest/help/Update-AzFleet.md @@ -8,38 +8,27 @@ schema: 2.0.0 # Update-AzFleet ## SYNOPSIS -Update a Fleet +Create a Fleet. ## SYNTAX ### UpdateExpanded (Default) ``` Update-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-IdentityType ] [-Tag ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentityExpanded -``` -Update-AzFleet -InputObject [-IfMatch ] [-IdentityType ] [-Tag ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [-IfNoneMatch ] [-EnableSystemAssignedIdentity ] [-Tag ] + [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### UpdateViaJsonFilePath -``` -Update-AzFleet -Name -ResourceGroupName -JsonFilePath [-SubscriptionId ] - [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaJsonString +### UpdateViaIdentityExpanded ``` -Update-AzFleet -Name -ResourceGroupName -JsonString [-SubscriptionId ] - [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Update-AzFleet -InputObject [-IfMatch ] [-IfNoneMatch ] + [-EnableSystemAssignedIdentity ] [-Tag ] [-UserAssignedIdentity ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Update a Fleet +Create a Fleet. ## EXAMPLES @@ -107,12 +96,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) Aliases: Required: False @@ -137,49 +126,33 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity -Parameter Sets: UpdateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -JsonFilePath -Path of Json file supplied to the Update operation +### -IfNoneMatch +The request should only proceed if no entity matches this string. ```yaml Type: System.String -Parameter Sets: UpdateViaJsonFilePath +Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -JsonString -Json string supplied to the Update operation +### -InputObject +Identity Parameter ```yaml -Type: System.String -Parameter Sets: UpdateViaJsonString +Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity +Parameter Sets: UpdateViaIdentityExpanded Aliases: Required: True Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` @@ -188,7 +161,7 @@ The name of the Fleet resource. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Parameter Sets: UpdateExpanded Aliases: FleetName Required: True @@ -219,7 +192,7 @@ The name is case insensitive. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -234,7 +207,7 @@ The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -249,7 +222,7 @@ Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -260,13 +233,12 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -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. +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.String[] +Parameter Sets: (All) Aliases: Required: False diff --git a/src/Fleet/Fleet.Autorest/help/Update-AzFleetMember.md b/src/Fleet/Fleet.Autorest/help/Update-AzFleetMember.md index 58a1c7074132..f790e0daa8d8 100644 --- a/src/Fleet/Fleet.Autorest/help/Update-AzFleetMember.md +++ b/src/Fleet/Fleet.Autorest/help/Update-AzFleetMember.md @@ -135,7 +135,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -196,7 +195,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity diff --git a/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateRun.md b/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateRun.md index 85a9c8d62ff9..32b121038d3c 100644 --- a/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateRun.md @@ -15,26 +15,21 @@ Create a UpdateRun ### UpdateExpanded (Default) ``` Update-AzFleetUpdateRun -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-NodeImageSelectionType ] - [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] - [-UpgradeType ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetUpdateRun -InputObject [-IfMatch ] [-IfNoneMatch ] - [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] - [-UpgradeKubernetesVersion ] [-UpgradeType ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetUpdateRun -FleetInputObject -Name [-IfMatch ] - [-IfNoneMatch ] [-NodeImageSelectionType ] [-StrategyStage ] - [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] [-UpgradeType ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] ``` ## DESCRIPTION @@ -145,7 +140,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -206,7 +200,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -235,21 +228,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -NodeImageSelectionType -The node image upgrade type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -NoWait Run the command asynchronously @@ -281,23 +259,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -StrategyStage -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. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SubscriptionId The ID of the target subscription. @@ -313,58 +274,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -UpdateStrategyId -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. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UpgradeKubernetesVersion -The Kubernetes version to upgrade the member clusters to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UpgradeType -The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateStrategy.md index c5b35b3e802e..160db316ef2c 100644 --- a/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateStrategy.md @@ -15,22 +15,21 @@ Create a FleetUpdateStrategy ### UpdateExpanded (Default) ``` Update-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-StrategyStage ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetUpdateStrategy -InputObject [-IfMatch ] [-IfNoneMatch ] - [-StrategyStage ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetUpdateStrategy -FleetInputObject -Name [-IfMatch ] - [-IfNoneMatch ] [-StrategyStage ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] ``` ## DESCRIPTION @@ -140,7 +139,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -201,7 +199,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -261,23 +258,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -StrategyStage -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. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SubscriptionId The ID of the target subscription. diff --git a/src/Fleet/Fleet/Az.Fleet.psd1 b/src/Fleet/Fleet/Az.Fleet.psd1 index 89e46eb1ba62..f0407561da72 100644 --- a/src/Fleet/Fleet/Az.Fleet.psd1 +++ b/src/Fleet/Fleet/Az.Fleet.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/19/2023 +# Generated on: 3/17/2024 # @{ @@ -51,16 +51,16 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.16.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'Fleet.Autorest/bin/Az.Fleet.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'Fleet.Autorest/Az.Fleet.format.ps1xml' @@ -83,10 +83,10 @@ FunctionsToExport = 'Get-AzFleet', 'Get-AzFleetCredentials', 'Get-AzFleetMember' CmdletsToExport = @() # Variables to export from this module -VariablesToExport = '*' +# VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = '*' +AliasesToExport = @() # DSC resources to export from this module # DscResourcesToExport = @() diff --git a/src/Fleet/Fleet/help/Az.Fleet.md b/src/Fleet/Fleet/help/Az.Fleet.md index e14e8b753d10..9096a1ebbe03 100644 --- a/src/Fleet/Fleet/help/Az.Fleet.md +++ b/src/Fleet/Fleet/help/Az.Fleet.md @@ -63,7 +63,7 @@ Starts an UpdateRun. Stops an UpdateRun. ### [Update-AzFleet](Update-AzFleet.md) -Update a Fleet +Create a Fleet. ### [Update-AzFleetMember](Update-AzFleetMember.md) Update a FleetMember diff --git a/src/Fleet/Fleet/help/Get-AzFleet.md b/src/Fleet/Fleet/help/Get-AzFleet.md index 38570b62f1b5..1dd45b882c9b 100644 --- a/src/Fleet/Fleet/help/Get-AzFleet.md +++ b/src/Fleet/Fleet/help/Get-AzFleet.md @@ -14,31 +14,26 @@ Gets a Fleet. ### List (Default) ``` -Get-AzFleet [-SubscriptionId ] [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleet [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ### Get ``` Get-AzFleet -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List1 ``` -Get-AzFleet -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleet -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzFleet -InputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleet -InputObject [-DefaultProfile ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -46,32 +41,51 @@ Gets a Fleet. ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: Lists the Fleet resources in a subscription +```powershell Get-AzFleet ``` -### EXAMPLE 2 -``` -Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test +```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 ``` -## PARAMETERS +This command lists the Fleet resources in a subscription. -### -Break -Wait for .NET debugger to attach +### Example 2: Get specific fleet with specified name +```powershell +Get-AzFleet -Name testfleet01 -ResourceGroupName K8sFleet-Test +``` -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: +```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. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` +## PARAMETERS ### -DefaultProfile The DefaultProfile parameter is not functional. @@ -89,39 +103,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -150,28 +133,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -180,21 +148,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -221,7 +174,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -232,26 +185,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/get-azfleet](https://learn.microsoft.com/powershell/module/az.fleet/get-azfleet) - diff --git a/src/Fleet/Fleet/help/Get-AzFleetCredentials.md b/src/Fleet/Fleet/help/Get-AzFleetCredentials.md index 688e95ab516a..53ec1a7f29d8 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetCredentials.md +++ b/src/Fleet/Fleet/help/Get-AzFleetCredentials.md @@ -14,9 +14,7 @@ Lists the user credentials of a Fleet. ``` Get-AzFleetCredentials -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -24,27 +22,14 @@ Lists the user credentials of a Fleet. ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: List the user credentials of a Fleet +```powershell Get-AzFleetCredentials -FleetName testfleet01 -ResourceGroupName K8sFleet-Test ``` -## PARAMETERS - -### -Break -Wait for .NET debugger to attach +This command lists the user credentials of a fleet. -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` +## PARAMETERS ### -DefaultProfile The DefaultProfile parameter is not functional. @@ -77,28 +62,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -107,51 +77,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -178,7 +103,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -222,9 +147,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetCredentialResults + ## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetcredentials](https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetcredentials) - diff --git a/src/Fleet/Fleet/help/Get-AzFleetMember.md b/src/Fleet/Fleet/help/Get-AzFleetMember.md index 6994eadb61dc..d6bbdec83e97 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetMember.md +++ b/src/Fleet/Fleet/help/Get-AzFleetMember.md @@ -15,31 +15,25 @@ Get a FleetMember ### List (Default) ``` Get-AzFleetMember -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentityFleet ``` -Get-AzFleetMember -Name -FleetInputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleetMember -Name -FleetInputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzFleetMember -InputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleetMember -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -47,32 +41,47 @@ Get a FleetMember ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: Get specific fleet member with specified name +```powershell Get-AzFleetMember -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name testmember ``` -### EXAMPLE 2 +```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 ``` -## PARAMETERS - -### -Break -Wait for .NET debugger to attach +```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… +``` -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: +This command gets a list of fleet member with specified fleet. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` +## PARAMETERS ### -DefaultProfile The DefaultProfile parameter is not functional. @@ -92,7 +101,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -121,39 +129,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -182,28 +159,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -212,21 +174,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -253,7 +200,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -264,36 +211,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetmember](https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetmember) - diff --git a/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md index b9b564389271..dcb304ed9d28 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md @@ -15,31 +15,26 @@ Get a UpdateRun ### List (Default) ``` Get-AzFleetUpdateRun -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzFleetUpdateRun -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ### GetViaIdentityFleet ``` -Get-AzFleetUpdateRun -Name -FleetInputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleetUpdateRun -Name -FleetInputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzFleetUpdateRun -InputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleetUpdateRun -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -47,32 +42,95 @@ Get a UpdateRun ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: Get a list of fleet update run with specified fleet +```powershell Get-AzFleetUpdateRun -FleetName testfleet01 -ResourceGroupName K8sFleet-Test ``` -### EXAMPLE 2 +```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 ``` -## PARAMETERS - -### -Break -Wait for .NET debugger to attach +```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 +``` -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: +This command gets specific fleet update run with specified name. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` +## PARAMETERS ### -DefaultProfile The DefaultProfile parameter is not functional. @@ -92,7 +150,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -121,39 +178,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -182,28 +208,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -212,21 +223,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -253,7 +249,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -264,36 +260,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdaterun](https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdaterun) - diff --git a/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md index 63233143b599..e9cb6bd2e046 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md @@ -15,31 +15,26 @@ Get a FleetUpdateStrategy ### List (Default) ``` Get-AzFleetUpdateStrategy -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ### GetViaIdentityFleet ``` Get-AzFleetUpdateStrategy -Name -FleetInputObject [-DefaultProfile ] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzFleetUpdateStrategy -InputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzFleetUpdateStrategy -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -47,32 +42,54 @@ Get a FleetUpdateStrategy ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: Get a list of fleet update strategy with specified fleet +```powershell Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test ``` -### EXAMPLE 2 -``` -Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1 +```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… ``` -## PARAMETERS +This command get a list of fleet update strategy. -### -Break -Wait for .NET debugger to attach +### Example 2: Get a fleet update strategy with specified name +```powershell +Get-AzFleetUpdateStrategy -FleetName testfleet01 -ResourceGroupName K8sFleet-Test -Name strategy1 +``` -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: +```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. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` +## PARAMETERS ### -DefaultProfile The DefaultProfile parameter is not functional. @@ -92,7 +109,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -121,39 +137,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -182,28 +167,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -212,21 +182,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -253,7 +208,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -264,36 +219,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdatestrategy](https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetupdatestrategy) - diff --git a/src/Fleet/Fleet/help/New-AzFleet.md b/src/Fleet/Fleet/help/New-AzFleet.md index a133201e2848..443b8cf6c8a6 100644 --- a/src/Fleet/Fleet/help/New-AzFleet.md +++ b/src/Fleet/Fleet/help/New-AzFleet.md @@ -15,34 +15,30 @@ Create a Fleet. ### CreateExpanded (Default) ``` New-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-IfNoneMatch ] -Location [-IdentityType ] [-Tag ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] -Location [-EnableSystemAssignedIdentity] [-Tag ] + [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-IfNoneMatch ] -JsonString [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-IfNoneMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityExpanded ``` New-AzFleet -InputObject [-IfMatch ] [-IfNoneMatch ] -Location - [-IdentityType ] [-Tag ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-AsJob] [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] + [-EnableSystemAssignedIdentity] [-Tag ] [-UserAssignedIdentity ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -51,11 +47,36 @@ Create a Fleet. ## EXAMPLES -### EXAMPLE 1 -``` +### 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. + ## PARAMETERS ### -AsJob @@ -68,22 +89,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -104,41 +110,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentityType -Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: System.String +Type: System.Management.Automation.SwitchParameter Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: @@ -181,7 +157,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -263,21 +238,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -285,13 +245,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -300,21 +260,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -341,7 +286,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -362,12 +307,11 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -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. +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable +Type: System.String[] Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: @@ -415,26 +359,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/new-azfleet](https://learn.microsoft.com/powershell/module/az.fleet/new-azfleet) - diff --git a/src/Fleet/Fleet/help/New-AzFleetMember.md b/src/Fleet/Fleet/help/New-AzFleetMember.md index 53395bc2a66c..6abb1cd5f824 100644 --- a/src/Fleet/Fleet/help/New-AzFleetMember.md +++ b/src/Fleet/Fleet/help/New-AzFleetMember.md @@ -16,43 +16,36 @@ Create a FleetMember ``` New-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -ClusterResourceId [-Group ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaJsonString ``` New-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonString [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityFleetExpanded ``` New-AzFleetMember -Name -FleetInputObject [-IfMatch ] [-IfNoneMatch ] - -ClusterResourceId [-Group ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + -ClusterResourceId [-Group ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityExpanded ``` New-AzFleetMember -InputObject [-IfMatch ] [-IfNoneMatch ] - -ClusterResourceId [-Group ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + -ClusterResourceId [-Group ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -60,11 +53,30 @@ Create a FleetMember ## EXAMPLES -### EXAMPLE 1 -``` +### 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. + ## PARAMETERS ### -AsJob @@ -77,22 +89,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -132,7 +129,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -176,36 +172,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -238,7 +204,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -305,21 +270,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -327,13 +277,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -342,21 +292,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -383,7 +318,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -425,36 +360,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetmember](https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetmember) - diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateGroupObject.md b/src/Fleet/Fleet/help/New-AzFleetUpdateGroupObject.md index 0bb472d207cd..aa7e1ee81a71 100644 --- a/src/Fleet/Fleet/help/New-AzFleetUpdateGroupObject.md +++ b/src/Fleet/Fleet/help/New-AzFleetUpdateGroupObject.md @@ -13,7 +13,7 @@ Create an in-memory object for UpdateGroup. ## SYNTAX ``` -New-AzFleetUpdateGroupObject -Name [] +New-AzFleetUpdateGroupObject -Name [-ProgressAction ] [] ``` ## DESCRIPTION @@ -21,11 +21,19 @@ Create an in-memory object for UpdateGroup. ## EXAMPLES -### EXAMPLE 1 -``` +### 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. + ## PARAMETERS ### -Name @@ -45,6 +53,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -53,9 +76,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.UpdateGroup + ## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdategroupobject](https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdategroupobject) - diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md index 25b233a87cf6..c2b1a92fbedc 100644 --- a/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md @@ -17,27 +17,22 @@ Create a UpdateRun New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -UpgradeType [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaJsonString ``` New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonString [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityFleetExpanded @@ -45,9 +40,8 @@ New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName -FleetInputObject [-IfMatch ] [-IfNoneMatch ] -UpgradeType [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaIdentityExpanded @@ -55,9 +49,7 @@ New-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch New-AzFleetUpdateRun -InputObject [-IfMatch ] [-IfNoneMatch ] -UpgradeType [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -65,11 +57,74 @@ Create a UpdateRun ## EXAMPLES -### EXAMPLE 1 -``` +### 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. + ## PARAMETERS ### -AsJob @@ -82,22 +137,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -120,7 +160,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -149,36 +188,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -211,7 +220,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -293,21 +301,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -315,13 +308,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -330,21 +323,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -364,7 +342,6 @@ Accept wildcard characters: False ### -StrategyStage 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. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] @@ -388,7 +365,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -482,48 +459,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetupdaterun](https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetupdaterun) - diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateStageObject.md b/src/Fleet/Fleet/help/New-AzFleetUpdateStageObject.md index e5b2cc5113fd..6066f58ce7fa 100644 --- a/src/Fleet/Fleet/help/New-AzFleetUpdateStageObject.md +++ b/src/Fleet/Fleet/help/New-AzFleetUpdateStageObject.md @@ -14,7 +14,7 @@ Create an in-memory object for UpdateStage. ``` New-AzFleetUpdateStageObject -Name [-AfterStageWaitInSecond ] [-Group ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -22,19 +22,43 @@ Create an in-memory object for UpdateStage. ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: create fleet update stage object with group string array +```powershell New-AzFleetUpdateStageObject -Name stag1 -Group @{name='group-a'} -AfterStageWaitInSecond 3600 | Format-List ``` -### EXAMPLE 2 +```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. + ## PARAMETERS ### -AfterStageWaitInSecond @@ -48,7 +72,7 @@ Aliases: Required: False Position: Named -Default value: 0 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -57,7 +81,6 @@ Accept wildcard characters: False 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. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateGroup[] @@ -87,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -95,19 +133,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdatestageobject](https://learn.microsoft.com/powershell/module/Az.Fleet/new-azfleetupdatestageobject) - diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md index 4c1591cb7204..bd4468971e30 100644 --- a/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md @@ -15,44 +15,39 @@ Create a FleetUpdateStrategy ### CreateViaIdentityExpanded (Default) ``` New-AzFleetUpdateStrategy -InputObject [-IfMatch ] [-IfNoneMatch ] - -StrategyStage [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + -StrategyStage [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonString - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaJsonFilePath ``` New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonFilePath - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateExpanded ``` New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -StrategyStage - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaIdentityFleetExpanded ``` New-AzFleetUpdateStrategy -Name -FleetInputObject [-IfMatch ] - [-IfNoneMatch ] -StrategyStage [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] -StrategyStage [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -60,19 +55,74 @@ Create a FleetUpdateStrategy ## EXAMPLES -### EXAMPLE 1 -``` +### 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 ``` -### EXAMPLE 2 -``` +```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. + ## PARAMETERS ### -AsJob @@ -85,22 +135,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -123,7 +158,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -152,36 +186,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -214,7 +218,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -281,21 +284,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -303,13 +291,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -318,21 +306,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -352,7 +325,6 @@ Accept wildcard characters: False ### -StrategyStage 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. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] @@ -376,7 +348,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -418,48 +390,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetupdatestrategy](https://learn.microsoft.com/powershell/module/az.fleet/new-azfleetupdatestrategy) - diff --git a/src/Fleet/Fleet/help/Remove-AzFleet.md b/src/Fleet/Fleet/help/Remove-AzFleet.md index 23061da34f41..ed3bc2da7725 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleet.md +++ b/src/Fleet/Fleet/help/Remove-AzFleet.md @@ -15,17 +15,14 @@ Delete a Fleet ### Delete (Default) ``` Remove-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-PassThru] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` -Remove-AzFleet -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-PassThru] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] +Remove-AzFleet -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -33,17 +30,21 @@ Delete a Fleet ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: Delete a Fleet +```powershell Remove-AzFleet -Name ttt -ResourceGroupName ps1-test ``` -### EXAMPLE 2 -``` +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. + ## PARAMETERS ### -AsJob @@ -56,22 +57,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -92,36 +78,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -139,7 +95,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -178,7 +133,7 @@ Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -191,21 +146,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -213,13 +153,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -228,21 +168,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -269,7 +194,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -311,26 +236,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS ### Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity + ## OUTPUTS ### System.Boolean -## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleet](https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleet) - diff --git a/src/Fleet/Fleet/help/Remove-AzFleetMember.md b/src/Fleet/Fleet/help/Remove-AzFleetMember.md index c4fa454ec90e..832deaa20acd 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleetMember.md +++ b/src/Fleet/Fleet/help/Remove-AzFleetMember.md @@ -15,25 +15,21 @@ Delete a FleetMember ### Delete (Default) ``` Remove-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-IfMatch ] [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-PassThru] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityFleet ``` Remove-AzFleetMember -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-PassThru] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzFleetMember -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-PassThru] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] - [-Confirm] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -41,17 +37,21 @@ Delete a FleetMember ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: Delete a fleet member +```powershell Remove-AzFleetMember -FleetName testfleet01 -Name testmember -ResourceGroupName K8sFleet-Test ``` -### EXAMPLE 2 -``` +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. + ## PARAMETERS ### -AsJob @@ -64,22 +64,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -102,7 +87,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -131,36 +115,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -178,7 +132,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -217,7 +170,7 @@ Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -230,21 +183,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -252,13 +190,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -267,21 +205,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -308,7 +231,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -350,36 +273,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS ### Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity + ## OUTPUTS ### System.Boolean -## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetmember](https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetmember) - diff --git a/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md index f7c8a1aa87fd..51a8ca40ce96 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md @@ -15,26 +15,21 @@ Delete a UpdateRun ### Delete (Default) ``` Remove-AzFleetUpdateRun -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-PassThru] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityFleet ``` Remove-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-PassThru] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzFleetUpdateRun -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-PassThru] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] - [-Confirm] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -42,11 +37,13 @@ Delete a UpdateRun ## EXAMPLES -### EXAMPLE 1 -``` +### Example 1: Delete a fleet update run +```powershell Remove-AzFleetUpdateRun -FleetName testfleet01 -Name run2 -ResourceGroupName K8sFleet-Test ``` +This command delete specified fleet update run. + ## PARAMETERS ### -AsJob @@ -59,22 +56,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -97,7 +79,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -126,36 +107,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -173,7 +124,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -212,7 +162,7 @@ Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -225,21 +175,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -247,13 +182,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -262,21 +197,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -303,7 +223,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -345,36 +265,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS ### Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity + ## OUTPUTS ### System.Boolean -## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetupdaterun](https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetupdaterun) - diff --git a/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md index 142de7cd3de6..649499fe793d 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md @@ -15,26 +15,21 @@ Delete a FleetUpdateStrategy ### Delete (Default) ``` Remove-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-PassThru] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityFleet ``` Remove-AzFleetUpdateStrategy -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-PassThru] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzFleetUpdateStrategy -InputObject [-IfMatch ] [-DefaultProfile ] - [-AsJob] [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-PassThru] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] - [-Confirm] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -42,17 +37,22 @@ Delete a FleetUpdateStrategy ## EXAMPLES -### EXAMPLE 1 -``` +### 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 ``` -### EXAMPLE 2 -``` +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. + ## PARAMETERS ### -AsJob @@ -65,22 +65,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -103,7 +88,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -132,36 +116,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -179,7 +133,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -218,7 +171,7 @@ Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -231,21 +184,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -253,13 +191,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -268,21 +206,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -309,7 +232,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -351,36 +274,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS ### Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity + ## OUTPUTS ### System.Boolean -## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetupdatestrategy](https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetupdatestrategy) - diff --git a/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md index 83d1930dcb24..b1882b283398 100644 --- a/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md @@ -15,25 +15,21 @@ Starts an UpdateRun. ### Start (Default) ``` Start-AzFleetUpdateRun -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### StartViaIdentityFleet ``` Start-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### StartViaIdentity ``` Start-AzFleetUpdateRun -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -41,11 +37,74 @@ Starts an UpdateRun. ## EXAMPLES -### EXAMPLE 1 -``` +### 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 + ## PARAMETERS ### -AsJob @@ -58,22 +117,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -96,7 +140,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -125,36 +168,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -172,7 +185,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -209,21 +221,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -231,13 +228,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -246,21 +243,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -287,7 +269,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -329,36 +311,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/start-azfleetupdaterun](https://learn.microsoft.com/powershell/module/az.fleet/start-azfleetupdaterun) - diff --git a/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md index 2a0cf7cf1941..8cbc1a33e182 100644 --- a/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md @@ -15,25 +15,21 @@ Stops an UpdateRun. ### Stop (Default) ``` Stop-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-IfMatch ] [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### StopViaIdentityFleet ``` Stop-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### StopViaIdentity ``` Stop-AzFleetUpdateRun -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -41,11 +37,79 @@ Stops an UpdateRun. ## EXAMPLES -### EXAMPLE 1 -``` +### 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. + ## PARAMETERS ### -AsJob @@ -58,22 +122,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -96,7 +145,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -125,36 +173,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -172,7 +190,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -209,21 +226,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -231,13 +233,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -246,21 +248,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -287,7 +274,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -329,36 +316,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/stop-azfleetupdaterun](https://learn.microsoft.com/powershell/module/az.fleet/stop-azfleetupdaterun) - diff --git a/src/Fleet/Fleet/help/Update-AzFleet.md b/src/Fleet/Fleet/help/Update-AzFleet.md index 014d48918a4b..2861c43fd79c 100644 --- a/src/Fleet/Fleet/help/Update-AzFleet.md +++ b/src/Fleet/Fleet/help/Update-AzFleet.md @@ -8,53 +8,62 @@ schema: 2.0.0 # Update-AzFleet ## SYNOPSIS -Update a Fleet +Create a Fleet. ## SYNTAX ### UpdateExpanded (Default) ``` Update-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-IdentityType ] [-Tag ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-AsJob] [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] -``` - -### UpdateViaJsonString -``` -Update-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - -JsonString [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] -``` - -### UpdateViaJsonFilePath -``` -Update-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - -JsonFilePath [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] [-EnableSystemAssignedIdentity ] [-Tag ] + [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` -Update-AzFleet -InputObject [-IfMatch ] [-IdentityType ] [-Tag ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] +Update-AzFleet -InputObject [-IfMatch ] [-IfNoneMatch ] + [-EnableSystemAssignedIdentity ] [-Tag ] [-UserAssignedIdentity ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION -Update a Fleet +Create a Fleet. ## EXAMPLES -### EXAMPLE 1 -``` +### 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. + ## PARAMETERS ### -AsJob @@ -67,22 +76,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -103,26 +97,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] +Type: System.Nullable`1[System.Boolean] Parameter Sets: (All) Aliases: @@ -133,12 +112,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +### -IfMatch +The request should only proceed if an entity matches this string. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -148,8 +127,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IfMatch -The request should only proceed if an entity matches this string. +### -IfNoneMatch +The request should only proceed if no entity matches this string. ```yaml Type: System.String @@ -165,7 +144,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -179,42 +157,12 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -JsonFilePath -Path of Json file supplied to the Update operation - -```yaml -Type: System.String -Parameter Sets: UpdateViaJsonFilePath -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JsonString -Json string supplied to the Update operation - -```yaml -Type: System.String -Parameter Sets: UpdateViaJsonString -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Name The name of the Fleet resource. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Parameter Sets: UpdateExpanded Aliases: FleetName Required: True @@ -232,21 +180,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -254,13 +187,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -269,28 +202,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -305,12 +223,12 @@ The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Parameter Sets: UpdateExpanded Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -320,7 +238,7 @@ Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -331,13 +249,12 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -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. +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.String[] +Parameter Sets: (All) Aliases: Required: False @@ -384,26 +301,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/update-azfleet](https://learn.microsoft.com/powershell/module/az.fleet/update-azfleet) - diff --git a/src/Fleet/Fleet/help/Update-AzFleetMember.md b/src/Fleet/Fleet/help/Update-AzFleetMember.md index c9bc254b75d7..bbc7248b262b 100644 --- a/src/Fleet/Fleet/help/Update-AzFleetMember.md +++ b/src/Fleet/Fleet/help/Update-AzFleetMember.md @@ -15,41 +15,36 @@ Update a FleetMember ### UpdateExpanded (Default) ``` Update-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-IfMatch ] [-Group ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfMatch ] [-Group ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonString ``` Update-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-IfMatch ] -JsonString [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfMatch ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Update-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-IfMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetMember -Name -FleetInputObject [-IfMatch ] [-Group ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetMember -InputObject [-IfMatch ] [-Group ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -57,17 +52,56 @@ Update a FleetMember ## EXAMPLES -### EXAMPLE 1 -``` +### 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' ``` -### EXAMPLE 2 +```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. + ## PARAMETERS ### -AsJob @@ -80,22 +114,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -118,7 +137,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -162,36 +180,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -209,7 +197,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -276,21 +263,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -298,13 +270,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -313,21 +285,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -354,7 +311,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -396,36 +353,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/update-azfleetmember](https://learn.microsoft.com/powershell/module/az.fleet/update-azfleetmember) - diff --git a/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md index c7a115469ec0..c7630ad433ad 100644 --- a/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md @@ -15,30 +15,22 @@ Create a UpdateRun ### UpdateExpanded (Default) ``` Update-AzFleetUpdateRun -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-NodeImageSelectionType ] - [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] - [-UpgradeType ] [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-IfNoneMatch ] [-NodeImageSelectionType ] [-StrategyStage ] - [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] [-UpgradeType ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetUpdateRun -InputObject [-IfMatch ] [-IfNoneMatch ] - [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] - [-UpgradeKubernetesVersion ] [-UpgradeType ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -46,11 +38,74 @@ Create a UpdateRun ## EXAMPLES -### EXAMPLE 1 -``` +### 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. + ## PARAMETERS ### -AsJob @@ -63,22 +118,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -101,7 +141,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -130,36 +169,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -192,7 +201,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -221,21 +229,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -NodeImageSelectionType -The node image upgrade type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -NoWait Run the command asynchronously @@ -244,21 +237,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -266,13 +244,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -281,21 +259,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -312,23 +275,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -StrategyStage -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. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SubscriptionId The ID of the target subscription. @@ -339,59 +285,7 @@ Aliases: Required: False Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UpdateStrategyId -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. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UpgradeKubernetesVersion -The Kubernetes version to upgrade the member clusters to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UpgradeType -The upgrade type.Full requires the KubernetesVersion property to be set.NodeImageOnly requires the KubernetesVersion property not to be set. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -433,48 +327,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/update-azfleetupdaterun](https://learn.microsoft.com/powershell/module/az.fleet/update-azfleetupdaterun) - diff --git a/src/Fleet/Fleet/help/Update-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/Update-AzFleetUpdateStrategy.md index 668827756eff..10d4476c8a85 100644 --- a/src/Fleet/Fleet/help/Update-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/Update-AzFleetUpdateStrategy.md @@ -15,26 +15,22 @@ Create a FleetUpdateStrategy ### UpdateExpanded (Default) ``` Update-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-StrategyStage ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetUpdateStrategy -Name -FleetInputObject [-IfMatch ] - [-IfNoneMatch ] [-StrategyStage ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetUpdateStrategy -InputObject [-IfMatch ] [-IfNoneMatch ] - [-StrategyStage ] [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -42,19 +38,73 @@ Create a FleetUpdateStrategy ## EXAMPLES -### EXAMPLE 1 -``` +### 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 ``` -### EXAMPLE 2 +```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. + ## PARAMETERS ### -AsJob @@ -67,22 +117,7 @@ Aliases: Required: False Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -105,7 +140,6 @@ Accept wildcard characters: False ### -FleetInputObject Identity Parameter -To construct, see NOTES section for FLEETINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -134,36 +168,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -IfMatch The request should only proceed if an entity matches this string. @@ -196,7 +200,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity @@ -233,21 +236,6 @@ Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - Required: False Position: Named Default value: None @@ -255,13 +243,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyCredential -Credentials for a proxy server to use for the remote call +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.Management.Automation.PSCredential +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -270,21 +258,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -301,23 +274,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -StrategyStage -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. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IUpdateStage[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SubscriptionId The ID of the target subscription. @@ -328,7 +284,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` @@ -370,48 +326,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## 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. +## NOTES ## RELATED LINKS - -[https://learn.microsoft.com/powershell/module/az.fleet/update-azfleetupdatestrategy](https://learn.microsoft.com/powershell/module/az.fleet/update-azfleetupdatestrategy) -