diff --git a/src/Fleet/Fleet.Autorest/Az.Fleet.psm1 b/src/Fleet/Fleet.Autorest/Az.Fleet.psm1 index bd9b3d3a6769..3d31d74c1b0e 100644 --- a/src/Fleet/Fleet.Autorest/Az.Fleet.psm1 +++ b/src/Fleet/Fleet.Autorest/Az.Fleet.psm1 @@ -47,37 +47,41 @@ # Ask for the shared functionality table $VTable = Register-AzModule - + # Tweaks the pipeline on module load $instance.OnModuleLoad = $VTable.OnModuleLoad # Following two delegates are added for telemetry $instance.GetTelemetryId = $VTable.GetTelemetryId $instance.Telemetry = $VTable.Telemetry - + + # Delegate to sanitize the output object + $instance.SanitizeOutput = $VTable.SanitizerHandler + + # Delegate to get the telemetry info + $instance.GetTelemetryInfo = $VTable.GetTelemetryInfo # Tweaks the pipeline per call $instance.OnNewRequest = $VTable.OnNewRequest - + # Gets shared parameter values $instance.GetParameterValue = $VTable.GetParameterValue - + # Allows shared module to listen to events from this module $instance.EventListener = $VTable.EventListener - + # Gets shared argument completers $instance.ArgumentCompleter = $VTable.ArgumentCompleter - + # The name of the currently selected Azure profile $instance.ProfileName = $VTable.ProfileName - # Load the custom module $customModulePath = Join-Path $PSScriptRoot './custom/Az.Fleet.custom.psm1' if(Test-Path $customModulePath) { $null = Import-Module -Name $customModulePath } - + # Export nothing to clear implicit exports Export-ModuleMember @@ -97,12 +101,12 @@ # Load the last folder if no profile is selected $profileDirectory = $directories | Select-Object -Last 1 } - + if($profileDirectory) { Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" $exportsPath = $profileDirectory.FullName } - + if($exportsPath) { Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath diff --git a/src/Fleet/Fleet.Autorest/README.md b/src/Fleet/Fleet.Autorest/README.md index 0916fb570f62..5d1f7334900c 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 @@ -38,6 +37,8 @@ require: title: Fleet module-version: 0.1.0 subject-prefix: $(service-name) +disable-transform-identity-type: true +flatten-userassignedidentity: false directive: # # # Following is two common directive which are normally required in all the RPs @@ -56,6 +57,23 @@ directive: - from: swagger-document where: $.definitions.UpdateRun transform: $['required'] = ['properties'] + - from: swagger-document + where: $.definitions.FleetUpdateStrategy.properties.properties.x-ms-mutability + transform: >- + return [ + "read", + "update", + "create" + ] + - from: swagger-document + where: $.definitions.UpdateRun.properties.properties + transform: $['x-ms-mutability'] = ["read", "update", "create"] + - from: swagger-document + where: $.definitions.ManagedClusterUpdate.properties.nodeImageSelection + transform: $['x-ms-mutability'] = ["read", "update", "create"] + - from: swagger-document + where: $.definitions.NodeImageSelection.properties.type + transform: $['x-ms-mutability'] = ["read", "update", "create"] # Hide set cmdlet - where: verb: Set diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleet.ps1 index c11d3178f817..4f7976c6bfa3 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()] @@ -160,7 +159,13 @@ begin { List1 = 'Az.Fleet.private\Get-AzFleet_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetCredentials.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetCredentials.ps1 index 7f6a21eb8c3f..aaca2f14fca2 100644 --- a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetCredentials.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetCredentials.ps1 @@ -129,7 +129,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetCredentials_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetMember.ps1 index 55046839297e..854306ef436d 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()] @@ -183,7 +181,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetMember_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateRun.ps1 index eca1f3fb44d5..4afffc4f519d 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()] @@ -183,7 +181,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetUpdateRun_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/Get-AzFleetUpdateStrategy.ps1 index 39f5c989019d..d4de983f56a3 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()] @@ -182,7 +180,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleet.ps1 index b643d7a2853f..a6081c542a39 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()] @@ -230,7 +229,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleet_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetMember.ps1 index 3703ada2e1d7..1c6a40148066 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()] @@ -241,7 +239,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleetMember_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/New-AzFleetUpdateRun.ps1 index 1433b1a89361..6dfe31b01c2a 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')] @@ -281,7 +278,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleetUpdateRun_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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..46509724d2df 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)] @@ -244,7 +241,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleetUpdateStrategy_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 index 5a2c7745f757..9bb1e947201f 100644 --- a/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -129,7 +129,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetCredentials_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -259,14 +265,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()] @@ -350,7 +354,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetMember_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -480,14 +490,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()] @@ -571,7 +579,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetUpdateRun_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -700,14 +714,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()] @@ -791,7 +803,13 @@ begin { List = 'Az.Fleet.private\Get-AzFleetUpdateStrategy_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -905,7 +923,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()] @@ -989,7 +1006,13 @@ begin { List1 = 'Az.Fleet.private\Get-AzFleet_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1122,14 +1145,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()] @@ -1268,7 +1289,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleetMember_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1407,14 +1434,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 +1480,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')] @@ -1587,7 +1611,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleetUpdateRun_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1730,14 +1760,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 +1788,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)] @@ -1869,7 +1896,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleetUpdateStrategy_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1984,7 +2017,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()] @@ -2137,7 +2169,13 @@ begin { CreateViaJsonString = 'Az.Fleet.private\New-AzFleet_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2265,14 +2303,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()] @@ -2379,7 +2415,13 @@ begin { DeleteViaIdentityFleet = 'Az.Fleet.private\Remove-AzFleetMember_DeleteViaIdentityFleet'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2504,14 +2546,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()] @@ -2618,7 +2658,13 @@ begin { DeleteViaIdentityFleet = 'Az.Fleet.private\Remove-AzFleetUpdateRun_DeleteViaIdentityFleet'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2745,14 +2791,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()] @@ -2859,7 +2903,13 @@ begin { DeleteViaIdentityFleet = 'Az.Fleet.private\Remove-AzFleetUpdateStrategy_DeleteViaIdentityFleet'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2971,7 +3021,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()] @@ -3077,7 +3126,13 @@ begin { DeleteViaIdentity = 'Az.Fleet.private\Remove-AzFleet_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3202,14 +3257,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()] @@ -3310,7 +3363,13 @@ begin { StartViaIdentityFleet = 'Az.Fleet.private\Start-AzFleetUpdateRun_StartViaIdentityFleet'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3435,14 +3494,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()] @@ -3543,7 +3600,13 @@ begin { StopViaIdentityFleet = 'Az.Fleet.private\Stop-AzFleetUpdateRun_StopViaIdentityFleet'; } if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3679,14 +3742,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()] @@ -3809,7 +3870,13 @@ begin { UpdateViaJsonString = 'Az.Fleet.private\Update-AzFleetMember_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3940,14 +4007,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()] @@ -3975,7 +4040,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()] @@ -4096,7 +4160,13 @@ begin { UpdateViaIdentityFleetExpanded = 'Az.Fleet.private\Update-AzFleetUpdateRun_UpdateViaIdentityFleetExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4231,14 +4301,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()] @@ -4259,7 +4327,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()] @@ -4354,7 +4421,13 @@ begin { UpdateViaIdentityFleetExpanded = 'Az.Fleet.private\Update-AzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4469,7 +4542,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()] @@ -4609,7 +4681,13 @@ begin { UpdateViaJsonString = 'Az.Fleet.private\Update-AzFleet_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4814,7 +4892,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..462f1b7c613b 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()] @@ -180,7 +179,13 @@ begin { DeleteViaIdentity = 'Az.Fleet.private\Remove-AzFleet_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetMember.ps1 index ab2186856fcb..5691ae178d0d 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()] @@ -204,7 +202,13 @@ begin { DeleteViaIdentityFleet = 'Az.Fleet.private\Remove-AzFleetMember_DeleteViaIdentityFleet'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateRun.ps1 index 2caedc7b2477..1a21c64b8436 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()] @@ -201,7 +199,13 @@ begin { DeleteViaIdentityFleet = 'Az.Fleet.private\Remove-AzFleetUpdateRun_DeleteViaIdentityFleet'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/Remove-AzFleetUpdateStrategy.ps1 index f438c7fefd32..46fcffac8c77 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()] @@ -203,7 +201,13 @@ begin { DeleteViaIdentityFleet = 'Az.Fleet.private\Remove-AzFleetUpdateStrategy_DeleteViaIdentityFleet'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Start-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Start-AzFleetUpdateRun.ps1 index 20cd67f76155..90bb8badcb8d 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()] @@ -195,7 +193,13 @@ begin { StartViaIdentityFleet = 'Az.Fleet.private\Start-AzFleetUpdateRun_StartViaIdentityFleet'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Stop-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Stop-AzFleetUpdateRun.ps1 index dc85036de975..f9ae040a7faa 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()] @@ -195,7 +193,13 @@ begin { StopViaIdentityFleet = 'Az.Fleet.private\Stop-AzFleetUpdateRun_StopViaIdentityFleet'; } if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleet.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleet.ps1 index 111ea06e29ba..bbd22f197442 100644 --- a/src/Fleet/Fleet.Autorest/exports/Update-AzFleet.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Update-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()] @@ -217,7 +216,13 @@ begin { UpdateViaJsonString = 'Az.Fleet.private\Update-AzFleet_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetMember.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetMember.ps1 index 216a290fcc4c..dd066c6ee8af 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()] @@ -228,7 +226,13 @@ begin { UpdateViaJsonString = 'Az.Fleet.private\Update-AzFleetMember_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 index 4ee2ee72a7c1..2a03a9d25a67 100644 --- a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateRun.ps1 @@ -93,14 +93,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()] @@ -128,7 +126,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()] @@ -249,7 +246,13 @@ begin { UpdateViaIdentityFleetExpanded = 'Az.Fleet.private\Update-AzFleetUpdateRun_UpdateViaIdentityFleetExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 index 5927e489ec51..b755c2cc3868 100644 --- a/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 +++ b/src/Fleet/Fleet.Autorest/exports/Update-AzFleetUpdateStrategy.ps1 @@ -97,14 +97,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()] @@ -125,7 +123,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()] @@ -220,7 +217,13 @@ begin { UpdateViaIdentityFleetExpanded = 'Az.Fleet.private\Update-AzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Fleet/Fleet.Autorest/generated/Module.cs b/src/Fleet/Fleet.Autorest/generated/Module.cs index cd6251c35862..2c03b7a8c1a1 100644 --- a/src/Fleet/Fleet.Autorest/generated/Module.cs +++ b/src/Fleet/Fleet.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Fleet using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using SanitizerDelegate = global::System.Action; + using GetTelemetryInfoDelegate = global::System.Func>; /// A class that contains the module-common code and data. public partial class Module @@ -26,12 +28,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 +61,11 @@ 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 delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } /// 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"; @@ -72,6 +82,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.Fleet"; + /// The delegate to call in WriteObject to sanitize the output object. + public SanitizerDelegate SanitizeOutput { get; set; } + /// The delegate for creating a telemetry. public TelemetryDelegate Telemetry { get; set; } @@ -117,9 +130,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/api/Models/FleetUpdateStrategy.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/FleetUpdateStrategy.cs index 77e243f274a1..85f11820cd87 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/FleetUpdateStrategy.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/FleetUpdateStrategy.cs @@ -176,7 +176,7 @@ public partial interface IFleetUpdateStrategy : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, 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) })] diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/FleetUpdateStrategy.json.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/FleetUpdateStrategy.json.cs index 32e13926f868..191fa8e30637 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/FleetUpdateStrategy.json.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/FleetUpdateStrategy.json.cs @@ -105,10 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode ToJson(Mic return container; } __proxyResource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeCreate)) - { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag" ,container.Add ); diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.cs index 8b2faa353e86..286c05dc73f8 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.cs @@ -65,7 +65,7 @@ public partial interface IManagedClusterUpdate : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"The node image upgrade type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.json.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.json.cs index 5f0f1a0a4cbb..c88360ddb2b0 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.json.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/ManagedClusterUpdate.json.cs @@ -102,10 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode ToJson(Mic return container; } AddIf( null != this._upgrade ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) this._upgrade.ToJson(null,serializationMode) : null, "upgrade" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeCreate)) - { - AddIf( null != this._nodeImageSelection ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) this._nodeImageSelection.ToJson(null,serializationMode) : null, "nodeImageSelection" ,container.Add ); - } + AddIf( null != this._nodeImageSelection ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) this._nodeImageSelection.ToJson(null,serializationMode) : null, "nodeImageSelection" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.cs index a0a8c6b83192..10d8f2d12364 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.cs @@ -36,7 +36,7 @@ public partial interface INodeImageSelection : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"The node image upgrade type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.json.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.json.cs index 368661f1273f..3ccad5cf2eed 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.json.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/NodeImageSelection.json.cs @@ -100,10 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode ToJson(Mic { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeCreate)) - { - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); - } + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.cs index 6b9fb16c6e55..c8aa89090e70 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.cs @@ -342,7 +342,7 @@ public partial interface IUpdateRun : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"The node image upgrade type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -413,7 +413,7 @@ public partial interface IUpdateRun : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, 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) })] @@ -447,7 +447,7 @@ public partial interface IUpdateRun : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, 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: @@ -469,7 +469,7 @@ UpdateRuns created by ""updateStrategyId"" snapshot the referenced UpdateStrateg ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"The Kubernetes version to upgrade the member clusters to.", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] @@ -484,7 +484,7 @@ UpdateRuns created by ""updateStrategyId"" snapshot the referenced UpdateStrateg ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"The upgrade type. Full requires the KubernetesVersion property to be set. NodeImageOnly requires the KubernetesVersion property not to be set.", diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.json.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.json.cs index 43e0a1375696..b201e068c572 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.json.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRun.json.cs @@ -83,10 +83,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode ToJson(Mic return container; } __proxyResource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeCreate)) - { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag" ,container.Add ); diff --git a/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRunProperties.cs b/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRunProperties.cs index 4d39bd89911a..1ef5bf5e7a4a 100644 --- a/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRunProperties.cs +++ b/src/Fleet/Fleet.Autorest/generated/api/Models/UpdateRunProperties.cs @@ -257,7 +257,7 @@ public partial interface IUpdateRunProperties : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"The node image upgrade type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetCredentials_List.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetCredentials_List.cs index b512682a89e4..55bad1e65227 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetCredentials_List.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetCredentials_List.cs @@ -214,6 +214,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -390,6 +400,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetMember_Get.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_Get.cs index 21449f0060b1..372c24d16728 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_Get.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_Get.cs @@ -229,6 +229,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -402,6 +412,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetMember_GetViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_GetViaIdentity.cs index 7485b83d327d..ccdc3d78390b 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_GetViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_GetViaIdentity.cs @@ -175,6 +175,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -369,6 +379,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetMember_GetViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_GetViaIdentityFleet.cs index 3d1bb0b42e8b..3b832985a3f0 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_GetViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_GetViaIdentityFleet.cs @@ -190,6 +190,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -381,6 +391,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetMember_List.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_List.cs index 831665eb8f4a..39cc0068f135 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_List.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetMember_List.cs @@ -220,6 +220,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -393,6 +403,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetOperation_List.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetOperation_List.cs index 52fe0b3e54e6..bcaec4684fa0 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetOperation_List.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetOperation_List.cs @@ -174,6 +174,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -344,6 +354,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateRun_Get.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_Get.cs index 27d7314bbd1e..3df451d1cef1 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_Get.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_Get.cs @@ -229,6 +229,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -402,6 +412,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateRun_GetViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_GetViaIdentity.cs index 1027aa117602..ca9983c1d95c 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_GetViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_GetViaIdentity.cs @@ -175,6 +175,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -369,6 +379,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateRun_GetViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_GetViaIdentityFleet.cs index 6df10399c0f7..45816bb3e9d9 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_GetViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_GetViaIdentityFleet.cs @@ -190,6 +190,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -381,6 +391,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateRun_List.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_List.cs index a303564634da..ac6bf2024308 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_List.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateRun_List.cs @@ -220,6 +220,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -393,6 +403,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateStrategy_Get.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_Get.cs index 5d6e43e234ff..fee81a30906e 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_Get.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_Get.cs @@ -228,6 +228,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -401,6 +411,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateStrategy_GetViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_GetViaIdentity.cs index f0c854b1ceb5..30785a3db976 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_GetViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_GetViaIdentity.cs @@ -175,6 +175,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -369,6 +379,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateStrategy_GetViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_GetViaIdentityFleet.cs index be6481f2e764..6a4a67eb0213 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_GetViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_GetViaIdentityFleet.cs @@ -189,6 +189,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -380,6 +390,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleetUpdateStrategy_List.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_List.cs index e20741363313..bddb53712cba 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_List.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleetUpdateStrategy_List.cs @@ -220,6 +220,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -393,6 +403,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleet_Get.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_Get.cs index 7486d64973da..4fab83ce67ce 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_Get.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_Get.cs @@ -215,6 +215,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Initializes a new instance of the cmdlet class. @@ -386,6 +396,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleet_GetViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_GetViaIdentity.cs index c3280a100b7c..7f2cd3a011a1 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_GetViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_GetViaIdentity.cs @@ -175,6 +175,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -365,6 +375,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleet_List.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_List.cs index 9f3daff084bc..ec6c1658fefe 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_List.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_List.cs @@ -192,6 +192,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Initializes a new instance of the cmdlet class. @@ -363,6 +373,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/GetAzFleet_List1.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_List1.cs index acf7f6572dbd..3f5f9946d3bd 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_List1.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/GetAzFleet_List1.cs @@ -206,6 +206,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Initializes a new instance of the cmdlet class. @@ -377,6 +387,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetMember_CreateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateExpanded.cs index 903fc29f0a97..3b7740526ba1 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateExpanded.cs @@ -326,6 +326,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -545,6 +555,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetMember_CreateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaIdentityExpanded.cs index 139e8cb80ecb..ccfd1d568895 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaIdentityExpanded.cs @@ -268,6 +268,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -511,6 +521,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetMember_CreateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaIdentityFleetExpanded.cs index 81b13a10880a..f3bf2698d69c 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaIdentityFleetExpanded.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -524,6 +534,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetMember_CreateViaJsonFilePath.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaJsonFilePath.cs index 7e8291b22f22..bb35af3b9ce6 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaJsonFilePath.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaJsonFilePath.cs @@ -313,6 +313,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -532,6 +542,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetMember_CreateViaJsonString.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaJsonString.cs index c831b2fc2c5d..1f800ea5bd4c 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaJsonString.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetMember_CreateViaJsonString.cs @@ -311,6 +311,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -530,6 +540,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateRun_CreateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateExpanded.cs index df9c364b6783..d3cbb5c5c61d 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateExpanded.cs @@ -369,6 +369,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -588,6 +598,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateRun_CreateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaIdentityExpanded.cs index 74935c719f82..8bf321d03adf 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaIdentityExpanded.cs @@ -311,6 +311,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -554,6 +564,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateRun_CreateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaIdentityFleetExpanded.cs index 9fee8b598f5b..236a2470d42a 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaIdentityFleetExpanded.cs @@ -327,6 +327,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -567,6 +577,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateRun_CreateViaJsonFilePath.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaJsonFilePath.cs index 4df26d5180d5..61a8c3a9caf4 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaJsonFilePath.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaJsonFilePath.cs @@ -313,6 +313,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -532,6 +542,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateRun_CreateViaJsonString.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaJsonString.cs index e48db17c853f..23fc3aa97bf0 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaJsonString.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateRun_CreateViaJsonString.cs @@ -311,6 +311,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -530,6 +540,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateStrategy_CreateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateExpanded.cs index f62e21deba22..f98a3f23b36c 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateExpanded.cs @@ -313,6 +313,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -532,6 +542,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateStrategy_CreateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaIdentityExpanded.cs index bdc33bdd1df9..be5f516ed773 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaIdentityExpanded.cs @@ -256,6 +256,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -499,6 +509,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateStrategy_CreateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaIdentityFleetExpanded.cs index eb24dc3f9fdc..fa8c1120446d 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaIdentityFleetExpanded.cs @@ -271,6 +271,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -511,6 +521,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateStrategy_CreateViaJsonFilePath.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaJsonFilePath.cs index 43ed5989a3d2..321005ce02a9 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaJsonFilePath.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaJsonFilePath.cs @@ -312,6 +312,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -531,6 +541,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleetUpdateStrategy_CreateViaJsonString.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaJsonString.cs index d86359670dbe..ed4b1ef2de02 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaJsonString.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleetUpdateStrategy_CreateViaJsonString.cs @@ -310,6 +310,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -529,6 +539,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleet_CreateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateExpanded.cs index d0d23e0f886c..4c57edc64324 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateExpanded.cs @@ -338,6 +338,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -557,6 +567,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleet_CreateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaIdentityExpanded.cs index b68c1720088a..9d305aa0a5f2 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaIdentityExpanded.cs @@ -295,6 +295,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -534,6 +544,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleet_CreateViaJsonFilePath.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaJsonFilePath.cs index fa95ed88dd80..28050d79186e 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaJsonFilePath.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaJsonFilePath.cs @@ -298,6 +298,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -517,6 +527,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/NewAzFleet_CreateViaJsonString.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaJsonString.cs index ec402456f398..8a82652935aa 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaJsonString.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/NewAzFleet_CreateViaJsonString.cs @@ -296,6 +296,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -515,6 +525,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetMember_Delete.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_Delete.cs index 78b5e4318036..4e45a1ee0565 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_Delete.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_Delete.cs @@ -296,6 +296,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -515,6 +525,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetMember_DeleteViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_DeleteViaIdentity.cs index dcb8454a7926..dd210b01d356 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_DeleteViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_DeleteViaIdentity.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -481,6 +491,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetMember_DeleteViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_DeleteViaIdentityFleet.cs index 846f501a452e..a328237d4074 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_DeleteViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetMember_DeleteViaIdentityFleet.cs @@ -254,6 +254,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -494,6 +504,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetUpdateRun_Delete.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_Delete.cs index 61799dd31c13..141830a12ea7 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_Delete.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_Delete.cs @@ -296,6 +296,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -515,6 +525,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetUpdateRun_DeleteViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_DeleteViaIdentity.cs index 23e1074d8d5f..ff07a9067ea7 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_DeleteViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_DeleteViaIdentity.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -481,6 +491,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetUpdateRun_DeleteViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_DeleteViaIdentityFleet.cs index 476ea59bda4b..5d781e83672d 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_DeleteViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateRun_DeleteViaIdentityFleet.cs @@ -254,6 +254,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -494,6 +504,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetUpdateStrategy_Delete.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_Delete.cs index bebfa846c74e..f17e68a111c5 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_Delete.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_Delete.cs @@ -295,6 +295,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -514,6 +524,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetUpdateStrategy_DeleteViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_DeleteViaIdentity.cs index 72287daf56e7..634edec09958 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_DeleteViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_DeleteViaIdentity.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -481,6 +491,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleetUpdateStrategy_DeleteViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_DeleteViaIdentityFleet.cs index 1920bfb524c4..816274fed085 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_DeleteViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleetUpdateStrategy_DeleteViaIdentityFleet.cs @@ -253,6 +253,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -493,6 +503,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleet_Delete.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleet_Delete.cs index 0bce048cbcd0..e828de4c29c6 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleet_Delete.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleet_Delete.cs @@ -281,6 +281,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -500,6 +510,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/RemoveAzFleet_DeleteViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleet_DeleteViaIdentity.cs index 6e3a870e34f8..824d0abb9e99 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleet_DeleteViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/RemoveAzFleet_DeleteViaIdentity.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -477,6 +487,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/StartAzFleetUpdateRun_Start.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_Start.cs index c1f5e0fc32d8..a6f4d93c9eec 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_Start.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_Start.cs @@ -281,6 +281,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -500,6 +510,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/StartAzFleetUpdateRun_StartViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_StartViaIdentity.cs index d9499abfb1f4..59b3da82048a 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_StartViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_StartViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -466,6 +476,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/StartAzFleetUpdateRun_StartViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_StartViaIdentityFleet.cs index 45292dc23dea..ca1f00fa5777 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_StartViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/StartAzFleetUpdateRun_StartViaIdentityFleet.cs @@ -239,6 +239,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -479,6 +489,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/StopAzFleetUpdateRun_Stop.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_Stop.cs index 9c32176ebd3a..8d5ca2dd6e16 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_Stop.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_Stop.cs @@ -281,6 +281,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -500,6 +510,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/StopAzFleetUpdateRun_StopViaIdentity.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_StopViaIdentity.cs index 7312edf0bdb7..3f6f0eb6bd87 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_StopViaIdentity.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_StopViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -466,6 +476,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/StopAzFleetUpdateRun_StopViaIdentityFleet.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_StopViaIdentityFleet.cs index b8cc6bcf6f20..c27bf64b44be 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_StopViaIdentityFleet.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/StopAzFleetUpdateRun_StopViaIdentityFleet.cs @@ -239,6 +239,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -479,6 +489,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetMember_UpdateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateExpanded.cs index 14bc779d640c..065f1db0cdb1 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateExpanded.cs @@ -296,6 +296,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -515,6 +525,21 @@ public UpdateAzFleetMember_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetMember_UpdateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaIdentityExpanded.cs index 4ae98fe91711..607c10b9f26a 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaIdentityExpanded.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -481,6 +491,21 @@ public UpdateAzFleetMember_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetMember_UpdateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaIdentityFleetExpanded.cs index 6e861ad01fed..d8f4e9b49f84 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaIdentityFleetExpanded.cs @@ -254,6 +254,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -494,6 +504,21 @@ public UpdateAzFleetMember_UpdateViaIdentityFleetExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetMember_UpdateViaJsonFilePath.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaJsonFilePath.cs index 6131381fc1a6..31caf5ec5f11 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaJsonFilePath.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaJsonFilePath.cs @@ -298,6 +298,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -517,6 +527,21 @@ public UpdateAzFleetMember_UpdateViaJsonFilePath() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetMember_UpdateViaJsonString.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaJsonString.cs index b417d7f21d1d..fb5d61184111 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaJsonString.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetMember_UpdateViaJsonString.cs @@ -296,6 +296,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -515,6 +525,21 @@ public UpdateAzFleetMember_UpdateViaJsonString() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetUpdateRun_UpdateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateExpanded.cs index f7634fe1c349..4df72df7af24 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateExpanded.cs @@ -369,6 +369,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -558,7 +568,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) @@ -614,6 +624,21 @@ private void Update_resourceBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs index 141ce987fdb4..18e9dc8e1011 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityExpanded.cs @@ -311,6 +311,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -502,7 +512,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 +535,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; } } @@ -582,6 +592,21 @@ private void Update_resourceBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs index b9d3d229f979..f9d4b20fa7f9 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateRun_UpdateViaIdentityFleetExpanded.cs @@ -327,6 +327,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -519,7 +529,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 +548,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; } } @@ -595,6 +605,21 @@ private void Update_resourceBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs index 2c74db365555..4308c21ed7d5 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateExpanded.cs @@ -313,6 +313,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -502,7 +512,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) @@ -542,6 +552,21 @@ private void Update_resourceBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs index f4960bc5a6a0..0e6146179380 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityExpanded.cs @@ -256,6 +256,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -447,7 +457,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 +480,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; } } @@ -511,6 +521,21 @@ private void Update_resourceBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs index 06ade22b9cae..05545d372cca 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleetUpdateStrategy_UpdateViaIdentityFleetExpanded.cs @@ -273,6 +273,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -465,7 +475,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 +494,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; } } @@ -525,6 +535,21 @@ private void Update_resourceBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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_UpdateExpanded.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateExpanded.cs index c5a55db70a38..a64fdcd12d4b 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateExpanded.cs @@ -312,6 +312,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -531,6 +541,21 @@ public UpdateAzFleet_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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..49bc35061a48 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaIdentityExpanded.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaIdentityExpanded.cs @@ -269,6 +269,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -508,6 +518,21 @@ public UpdateAzFleet_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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 index 991a0f1542ca..722dcfb5c872 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonFilePath.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonFilePath.cs @@ -283,6 +283,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -502,6 +512,21 @@ public UpdateAzFleet_UpdateViaJsonFilePath() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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_UpdateViaJsonString.cs b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonString.cs index fc55612c99f9..48616612a0ac 100644 --- a/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonString.cs +++ b/src/Fleet/Fleet.Autorest/generated/cmdlets/UpdateAzFleet_UpdateViaJsonString.cs @@ -281,6 +281,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -500,6 +510,21 @@ public UpdateAzFleet_UpdateViaJsonString() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Fleet.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// 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/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/Cmdlets/ExportTestStub.cs b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index c8a1e7a07008..10110449cd03 100644 --- a/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/src/Fleet/Fleet.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,44 +12,65 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "TestStub")] - [DoNotExport] - public class ExportTestStub : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ModuleName { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string OutputFolder { get; set; } - - [Parameter] - public SwitchParameter IncludeGenerated { get; set; } - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } - var exportDirectories = Directory.GetDirectories(ExportsFolder); - if (!exportDirectories.Any()) - { - exportDirectories = new[] { ExportsFolder }; - } - var utilFile = Path.Combine(OutputFolder, "utils.ps1"); - if (!File.Exists(utilFile)) + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() { - var sc = new StringBuilder(); - sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { if ($allChars) { return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) } else { @@ -105,37 +126,40 @@ function cleanupEnv() { # Clean resources you create for testing } "); - File.WriteAllText(utilFile, sc.ToString()); - } - foreach (var exportDirectory in exportDirectories) - { - var outputFolder = OutputFolder; - if (exportDirectory != ExportsFolder) - { - outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); - Directory.CreateDirectory(outputFolder); - } - - var variantGroups = GetScriptCmdlets(exportDirectory) - .SelectMany(fi => fi.ToVariants()) - .Where(v => !v.IsDoNotExport) - .GroupBy(v => v.CmdletName) - .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) - .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); - - foreach (var variantGroup in variantGroups) - { - var sb = new StringBuilder(); - sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); - sb.AppendLine(@"{ + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath)" -); - sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); - sb.AppendLine(@" $currentPath = $PSScriptRoot + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File $currentPath = Split-Path -Path $currentPath -Parent @@ -145,29 +169,29 @@ function cleanupEnv() { "); - sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); - var variants = variantGroup.Variants - .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) - .ToList(); + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); + + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); - foreach (var variant in variants) + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) { - sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); - sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); - var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; - sb.AppendLine($"{Indent}}}{variantSeparator}"); + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; } - sb.AppendLine("}"); - - File.WriteAllText(variantGroup.FilePath, sb.ToString()); - } } - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } 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..3274023c8b4a 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; @@ -289,12 +290,31 @@ private string GetDefaultValuesStatements() { setCondition = $" -and {defaultInfo.SetCondition}"; } - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); - sb.Append($"{Indent}{Indent}}}"); + //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to + //override default value set in required readme + if ("SubscriptionId".Equals(parameterName)) + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Fleet.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }}"); + sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); + sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.AppendLine($"{Indent}{Indent}{Indent}}}"); + sb.Append($"{Indent}{Indent}}}"); + } + else + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } + } 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/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..6e4e8d4f3efa 100644 --- a/src/Fleet/Fleet.Autorest/help/New-AzFleet.md +++ b/src/Fleet/Fleet.Autorest/help/New-AzFleet.md @@ -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 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..e295164c6671 100644 --- a/src/Fleet/Fleet.Autorest/help/Update-AzFleet.md +++ b/src/Fleet/Fleet.Autorest/help/Update-AzFleet.md @@ -139,7 +139,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-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..09ef3a343d7f 100644 --- a/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateRun.md @@ -145,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 @@ -206,7 +205,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 @@ -284,7 +282,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/Update-AzFleetUpdateStrategy.md b/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateStrategy.md index c5b35b3e802e..a0a860242977 100644 --- a/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet.Autorest/help/Update-AzFleetUpdateStrategy.md @@ -140,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 @@ -201,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 @@ -264,7 +262,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/internal/Az.Fleet.internal.psm1 b/src/Fleet/Fleet.Autorest/internal/Az.Fleet.internal.psm1 index d4b2c908b709..014ffc913de4 100644 --- a/src/Fleet/Fleet.Autorest/internal/Az.Fleet.internal.psm1 +++ b/src/Fleet/Fleet.Autorest/internal/Az.Fleet.internal.psm1 @@ -24,12 +24,12 @@ # Load the last folder if no profile is selected $profileDirectory = $directories | Select-Object -Last 1 } - + if($profileDirectory) { Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" $exportsPath = $profileDirectory.FullName } - + if($exportsPath) { Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath diff --git a/src/Fleet/Fleet.Autorest/test-module.ps1 b/src/Fleet/Fleet.Autorest/test-module.ps1 index 7d988b4aed33..1ab071920606 100644 --- a/src/Fleet/Fleet.Autorest/test-module.ps1 +++ b/src/Fleet/Fleet.Autorest/test-module.ps1 @@ -74,13 +74,14 @@ try if ($TestMode -ne 'playback') { setupEnv + } else { + $env:AzPSAutorestTestPlaybackMode = $true } $testFolder = Join-Path $PSScriptRoot 'test' if ($null -ne $TestName) { Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") - } else - { + } else { Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") } } Finally @@ -89,6 +90,9 @@ try { cleanupEnv } + else { + $env:AzPSAutorestTestPlaybackMode = '' + } } Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/Fleet/Fleet.Autorest/test/loadEnv.ps1 b/src/Fleet/Fleet.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/Fleet/Fleet.Autorest/test/loadEnv.ps1 +++ b/src/Fleet/Fleet.Autorest/test/loadEnv.ps1 @@ -25,5 +25,5 @@ if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { $env = @{} if (Test-Path -Path $envFilePath) { $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json - $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} + $PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant} } \ No newline at end of file diff --git a/src/Fleet/Fleet.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/Fleet/Fleet.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/Fleet/Fleet.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 @@ -0,0 +1,7 @@ +param() +if ($env:AzPSAutorestTestPlaybackMode) { + $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' + . ($loadEnvPath) + return $env.SubscriptionId +} +return (Get-AzContext).Subscription.Id \ No newline at end of file diff --git a/src/Fleet/Fleet/Az.Fleet.psd1 b/src/Fleet/Fleet/Az.Fleet.psd1 index 89e46eb1ba62..80da579fe50d 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/25/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/ChangeLog.md b/src/Fleet/Fleet/ChangeLog.md index e10038c35285..23b50d35b1ce 100644 --- a/src/Fleet/Fleet/ChangeLog.md +++ b/src/Fleet/Fleet/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Introduced secrets detection feature to safeguard sensitive data. ## Version 0.1.0 * First preview release for module Az.Fleet diff --git a/src/Fleet/Fleet/help/Az.Fleet.md b/src/Fleet/Fleet/help/Az.Fleet.md index 9096a1ebbe03..e14e8b753d10 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) -Create a Fleet. +Update 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 9e7a600bfc13..1dd45b882c9b 100644 --- a/src/Fleet/Fleet/help/Get-AzFleet.md +++ b/src/Fleet/Fleet/help/Get-AzFleet.md @@ -14,25 +14,25 @@ Gets a Fleet. ### List (Default) ``` -Get-AzFleet [-SubscriptionId ] [-DefaultProfile ] +Get-AzFleet [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzFleet -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List1 ``` Get-AzFleet -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzFleet -InputObject [-DefaultProfile ] +Get-AzFleet -InputObject [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -133,6 +133,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Get-AzFleetCredentials.md b/src/Fleet/Fleet/help/Get-AzFleetCredentials.md index 0a0ab3baaeb0..53ec1a7f29d8 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetCredentials.md +++ b/src/Fleet/Fleet/help/Get-AzFleetCredentials.md @@ -14,7 +14,7 @@ Lists the user credentials of a Fleet. ``` Get-AzFleetCredentials -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -62,6 +62,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Get-AzFleetMember.md b/src/Fleet/Fleet/help/Get-AzFleetMember.md index 77185e773aeb..d6bbdec83e97 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetMember.md +++ b/src/Fleet/Fleet/help/Get-AzFleetMember.md @@ -15,25 +15,25 @@ Get a FleetMember ### List (Default) ``` Get-AzFleetMember -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentityFleet ``` Get-AzFleetMember -Name -FleetInputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzFleetMember -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -159,6 +159,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md index a1a87f055f6f..dcb304ed9d28 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Get-AzFleetUpdateRun.md @@ -15,26 +15,26 @@ Get a UpdateRun ### List (Default) ``` Get-AzFleetUpdateRun -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzFleetUpdateRun -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentityFleet ``` Get-AzFleetUpdateRun -Name -FleetInputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzFleetUpdateRun -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -208,6 +208,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md index 0075025ddd7e..e9cb6bd2e046 100644 --- a/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/Get-AzFleetUpdateStrategy.md @@ -15,26 +15,26 @@ Get a FleetUpdateStrategy ### List (Default) ``` Get-AzFleetUpdateStrategy -FleetName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentityFleet ``` Get-AzFleetUpdateStrategy -Name -FleetInputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzFleetUpdateStrategy -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -167,6 +167,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/New-AzFleet.md b/src/Fleet/Fleet/help/New-AzFleet.md index ee5893ff43f2..929a433f32f1 100644 --- a/src/Fleet/Fleet/help/New-AzFleet.md +++ b/src/Fleet/Fleet/help/New-AzFleet.md @@ -15,31 +15,30 @@ Create a Fleet. ### CreateExpanded (Default) ``` New-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-IfNoneMatch ] -Location [-EnableSystemAssignedIdentity] [-Tag ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] -Location [-IdentityType ] [-Tag ] + [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityExpanded ``` New-AzFleet -InputObject [-IfMatch ] [-IfNoneMatch ] -Location - [-EnableSystemAssignedIdentity] [-Tag ] [-UserAssignedIdentity ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-IdentityType ] [-Tag ] [-UserAssignedIdentity ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -110,11 +109,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EnableSystemAssignedIdentity -Decides if enable a system assigned identity for the resource. +### -IdentityType +Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ```yaml -Type: System.Management.Automation.SwitchParameter +Type: System.String Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: @@ -245,6 +244,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -292,11 +306,12 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -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}.' +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. ```yaml -Type: System.String[] +Type: System.Collections.Hashtable Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: diff --git a/src/Fleet/Fleet/help/New-AzFleetMember.md b/src/Fleet/Fleet/help/New-AzFleetMember.md index f5fff9f4bdaf..6abb1cd5f824 100644 --- a/src/Fleet/Fleet/help/New-AzFleetMember.md +++ b/src/Fleet/Fleet/help/New-AzFleetMember.md @@ -16,7 +16,7 @@ Create a FleetMember ``` New-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -ClusterResourceId [-Group ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,28 +24,28 @@ New-AzFleetMember -FleetName -Name -ResourceGroupName ``` New-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonString [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityFleetExpanded ``` New-AzFleetMember -Name -FleetInputObject [-IfMatch ] [-IfNoneMatch ] -ClusterResourceId [-Group ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityExpanded ``` New-AzFleetMember -InputObject [-IfMatch ] [-IfNoneMatch ] -ClusterResourceId [-Group ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -277,6 +277,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateGroupObject.md b/src/Fleet/Fleet/help/New-AzFleetUpdateGroupObject.md index bb3c20eee2d6..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 @@ -53,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). diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md index 8c8e0cb9763e..c2b1a92fbedc 100644 --- a/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/New-AzFleetUpdateRun.md @@ -17,7 +17,7 @@ Create a UpdateRun New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -UpgradeType [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -25,14 +25,14 @@ New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonString [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityFleetExpanded @@ -40,7 +40,7 @@ New-AzFleetUpdateRun -FleetName -Name -ResourceGroupName -FleetInputObject [-IfMatch ] [-IfNoneMatch ] -UpgradeType [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -49,7 +49,7 @@ New-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch New-AzFleetUpdateRun -InputObject [-IfMatch ] [-IfNoneMatch ] -UpgradeType [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -308,6 +308,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateStageObject.md b/src/Fleet/Fleet/help/New-AzFleetUpdateStageObject.md index 7536fdeb30cb..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 @@ -110,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). diff --git a/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md index a46430b7ef0d..bd4468971e30 100644 --- a/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/New-AzFleetUpdateStrategy.md @@ -16,14 +16,14 @@ Create a FleetUpdateStrategy ``` New-AzFleetUpdateStrategy -InputObject [-IfMatch ] [-IfNoneMatch ] -StrategyStage [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonString - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -31,7 +31,7 @@ New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName ``` New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -JsonFilePath - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -39,7 +39,7 @@ New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName ``` New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] -StrategyStage - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -47,7 +47,7 @@ New-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName ``` New-AzFleetUpdateStrategy -Name -FleetInputObject [-IfMatch ] [-IfNoneMatch ] -StrategyStage [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -291,6 +291,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Remove-AzFleet.md b/src/Fleet/Fleet/help/Remove-AzFleet.md index dbc8708a243b..ed3bc2da7725 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleet.md +++ b/src/Fleet/Fleet/help/Remove-AzFleet.md @@ -15,14 +15,14 @@ Delete a Fleet ### Delete (Default) ``` Remove-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzFleet -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -153,6 +153,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Remove-AzFleetMember.md b/src/Fleet/Fleet/help/Remove-AzFleetMember.md index b482a80956cf..832deaa20acd 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleetMember.md +++ b/src/Fleet/Fleet/help/Remove-AzFleetMember.md @@ -16,20 +16,20 @@ Delete a FleetMember ``` Remove-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityFleet ``` Remove-AzFleetMember -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzFleetMember -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -190,6 +190,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md index b221593c59e1..51a8ca40ce96 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Remove-AzFleetUpdateRun.md @@ -16,20 +16,20 @@ Delete a UpdateRun ``` Remove-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityFleet ``` Remove-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzFleetUpdateRun -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -182,6 +182,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md index e897120c8a86..649499fe793d 100644 --- a/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/Remove-AzFleetUpdateStrategy.md @@ -16,20 +16,20 @@ Delete a FleetUpdateStrategy ``` Remove-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityFleet ``` Remove-AzFleetUpdateStrategy -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzFleetUpdateStrategy -InputObject [-IfMatch ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -191,6 +191,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md index dbd24b8aa03c..b1882b283398 100644 --- a/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Start-AzFleetUpdateRun.md @@ -16,20 +16,20 @@ Starts an UpdateRun. ``` Start-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### StartViaIdentityFleet ``` Start-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### StartViaIdentity ``` Start-AzFleetUpdateRun -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -228,6 +228,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md index 5caf965499fc..8cbc1a33e182 100644 --- a/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Stop-AzFleetUpdateRun.md @@ -15,21 +15,21 @@ Stops an UpdateRun. ### Stop (Default) ``` Stop-AzFleetUpdateRun -FleetName -Name -ResourceGroupName [-SubscriptionId ] - [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### StopViaIdentityFleet ``` Stop-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### StopViaIdentity ``` Stop-AzFleetUpdateRun -InputObject [-IfMatch ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -233,6 +233,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Update-AzFleet.md b/src/Fleet/Fleet/help/Update-AzFleet.md index de4db669b1cb..430eb646b9f5 100644 --- a/src/Fleet/Fleet/help/Update-AzFleet.md +++ b/src/Fleet/Fleet/help/Update-AzFleet.md @@ -8,28 +8,40 @@ schema: 2.0.0 # Update-AzFleet ## SYNOPSIS -Create a Fleet. +Update a Fleet ## SYNTAX ### UpdateExpanded (Default) ``` Update-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] - [-IfNoneMatch ] [-EnableSystemAssignedIdentity ] [-Tag ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-IdentityType ] [-Tag ] [-UserAssignedIdentity ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzFleet -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` -Update-AzFleet -InputObject [-IfMatch ] [-IfNoneMatch ] - [-EnableSystemAssignedIdentity ] [-Tag ] [-UserAssignedIdentity ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] +Update-AzFleet -InputObject [-IfMatch ] [-IdentityType ] [-Tag ] + [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Create a Fleet. +Update a Fleet ## EXAMPLES @@ -97,12 +109,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EnableSystemAssignedIdentity -Decides if enable a system assigned identity for the resource. +### -IdentityType +Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ```yaml -Type: System.Nullable`1[System.Boolean] -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -127,33 +139,48 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IfNoneMatch -The request should only proceed if no entity matches this string. +### -InputObject +Identity Parameter + +```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 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateViaJsonFilePath Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter +### -JsonString +Json string supplied to the Update operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Fleet.Models.IFleetIdentity -Parameter Sets: UpdateViaIdentityExpanded +Type: System.String +Parameter Sets: UpdateViaJsonString Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` @@ -162,7 +189,7 @@ The name of the Fleet resource. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: FleetName Required: True @@ -187,13 +214,28 @@ 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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: Required: True @@ -208,7 +250,7 @@ The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: Required: False @@ -223,7 +265,7 @@ Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -234,12 +276,13 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -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}.' +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. ```yaml -Type: System.String[] -Parameter Sets: (All) +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False diff --git a/src/Fleet/Fleet/help/Update-AzFleetMember.md b/src/Fleet/Fleet/help/Update-AzFleetMember.md index 718b2587366b..bbc7248b262b 100644 --- a/src/Fleet/Fleet/help/Update-AzFleetMember.md +++ b/src/Fleet/Fleet/help/Update-AzFleetMember.md @@ -16,34 +16,34 @@ Update a FleetMember ``` Update-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-Group ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonString ``` Update-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Update-AzFleetMember -FleetName -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetMember -Name -FleetInputObject [-IfMatch ] [-Group ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetMember -InputObject [-IfMatch ] [-Group ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -270,6 +270,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md b/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md index 84aea16ff9ee..1666032d2175 100644 --- a/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md +++ b/src/Fleet/Fleet/help/Update-AzFleetUpdateRun.md @@ -15,22 +15,27 @@ Create a UpdateRun ### UpdateExpanded (Default) ``` Update-AzFleetUpdateRun -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-NodeImageSelectionType ] + [-StrategyStage ] [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] + [-UpgradeType ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetUpdateRun -Name -FleetInputObject [-IfMatch ] - [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] [-NodeImageSelectionType ] [-StrategyStage ] + [-UpdateStrategyId ] [-UpgradeKubernetesVersion ] [-UpgradeType ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetUpdateRun -InputObject [-IfMatch ] [-IfNoneMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-NodeImageSelectionType ] [-StrategyStage ] [-UpdateStrategyId ] + [-UpgradeKubernetesVersion ] [-UpgradeType ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -229,6 +234,21 @@ 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,6 +264,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -260,6 +295,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -StrategyStage +The list of stages that compose this update run. +Min size: 1. + +```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. @@ -275,6 +326,58 @@ 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/help/Update-AzFleetUpdateStrategy.md b/src/Fleet/Fleet/help/Update-AzFleetUpdateStrategy.md index ec8feb38d90e..1e6c8cd1a58a 100644 --- a/src/Fleet/Fleet/help/Update-AzFleetUpdateStrategy.md +++ b/src/Fleet/Fleet/help/Update-AzFleetUpdateStrategy.md @@ -15,22 +15,23 @@ Create a FleetUpdateStrategy ### UpdateExpanded (Default) ``` Update-AzFleetUpdateStrategy -FleetName -Name -ResourceGroupName - [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] [-IfMatch ] [-IfNoneMatch ] [-StrategyStage ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaIdentityFleetExpanded ``` Update-AzFleetUpdateStrategy -Name -FleetInputObject [-IfMatch ] - [-IfNoneMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-IfNoneMatch ] [-StrategyStage ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzFleetUpdateStrategy -InputObject [-IfMatch ] [-IfNoneMatch ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-StrategyStage ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -243,6 +244,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -259,6 +275,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -StrategyStage +The list of stages that compose this update run. +Min size: 1. + +```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.